Tabnine Logo
HystrixMetricsPublisherDefault
Code IndexAdd Tabnine to your IDE (free)

How to use
HystrixMetricsPublisherDefault
in
com.netflix.hystrix.strategy.metrics

Best Java code snippets using com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisherDefault (Showing top 2 results out of 315)

origin: PipelineAI/pipeline

/**
 * Retrieve instance of {@link HystrixMetricsPublisher} to use based on order of precedence as defined in {@link HystrixPlugins} class header.
 * <p>
 * Override default by using {@link #registerMetricsPublisher(HystrixMetricsPublisher)} or setting property (via Archaius): <code>hystrix.plugin.HystrixMetricsPublisher.implementation</code> with the full
 * classname to load.
 * 
 * @return {@link HystrixMetricsPublisher} implementation to use
 */
public HystrixMetricsPublisher getMetricsPublisher() {
  if (metricsPublisher.get() == null) {
    // check for an implementation from Archaius first
    Object impl = getPluginImplementation(HystrixMetricsPublisher.class);
    if (impl == null) {
      // nothing set via Archaius so initialize with default
      metricsPublisher.compareAndSet(null, HystrixMetricsPublisherDefault.getInstance());
      // we don't return from here but call get() again in case of thread-race so the winner will always get returned
    } else {
      // we received an implementation from Archaius so use it
      metricsPublisher.compareAndSet(null, (HystrixMetricsPublisher) impl);
    }
  }
  return metricsPublisher.get();
}
origin: com.netflix.hystrix/hystrix-core

/**
 * Retrieve instance of {@link HystrixMetricsPublisher} to use based on order of precedence as defined in {@link HystrixPlugins} class header.
 * <p>
 * Override default by using {@link #registerMetricsPublisher(HystrixMetricsPublisher)} or setting property (via Archaius): <code>hystrix.plugin.HystrixMetricsPublisher.implementation</code> with the full
 * classname to load.
 * 
 * @return {@link HystrixMetricsPublisher} implementation to use
 */
public HystrixMetricsPublisher getMetricsPublisher() {
  if (metricsPublisher.get() == null) {
    // check for an implementation from Archaius first
    Object impl = getPluginImplementation(HystrixMetricsPublisher.class);
    if (impl == null) {
      // nothing set via Archaius so initialize with default
      metricsPublisher.compareAndSet(null, HystrixMetricsPublisherDefault.getInstance());
      // we don't return from here but call get() again in case of thread-race so the winner will always get returned
    } else {
      // we received an implementation from Archaius so use it
      metricsPublisher.compareAndSet(null, (HystrixMetricsPublisher) impl);
    }
  }
  return metricsPublisher.get();
}
com.netflix.hystrix.strategy.metricsHystrixMetricsPublisherDefault

Javadoc

Default implementation of HystrixMetricsPublisher.

See Wiki docs about plugins for more information.

Most used methods

  • getInstance

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JTextField (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now