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

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

Best Java code snippets using com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisherDefault.getInstance (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.metricsHystrixMetricsPublisherDefaultgetInstance

Popular methods of HystrixMetricsPublisherDefault

    Popular in Java

    • Reactive rest calls using spring rest template
    • setContentView (Activity)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getApplicationContext (Context)
    • Point (java.awt)
      A point representing a location in (x,y) coordinate space, specified in integer precision.
    • IOException (java.io)
      Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
    • HttpURLConnection (java.net)
      An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
    • ZipFile (java.util.zip)
      This class provides random read access to a zip file. You pay more to read the zip file's central di
    • HttpServletRequest (javax.servlet.http)
      Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
    • Project (org.apache.tools.ant)
      Central representation of an Ant project. This class defines an Ant project with all of its targets,
    • Top Sublime Text plugins
    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