Codota Logo
SharedMetricRegistries.add
Code IndexAdd Codota to your IDE (free)

How to use
add
method
in
com.codahale.metrics.SharedMetricRegistries

Best Java code snippets using com.codahale.metrics.SharedMetricRegistries.add (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: io.dropwizard.metrics/metrics-core

public static MetricRegistry getOrCreate(String name) {
  final MetricRegistry existing = REGISTRIES.get(name);
  if (existing == null) {
    final MetricRegistry created = new MetricRegistry();
    final MetricRegistry raced = add(name, created);
    if (raced == null) {
      return created;
    }
    return raced;
  }
  return existing;
}
origin: io.dropwizard.metrics/metrics-core

/**
 * Sets the provided registry as the default one under the provided name
 *
 * @param name           the default registry name
 * @param metricRegistry the default registry
 * @throws IllegalStateException if the default registry has already been set
 */
public static MetricRegistry setDefault(String name, MetricRegistry metricRegistry) {
  if (defaultRegistryName.compareAndSet(null, name)) {
    add(name, metricRegistry);
    return metricRegistry;
  }
  throw new IllegalStateException("Default metric registry name is already set.");
}
origin: signalapp/Signal-Server

 throws Exception
SharedMetricRegistries.add(Constants.METRICS_NAME, environment.metrics());
environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
environment.getObjectMapper().setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
origin: com.ning.billing/killbill-osgi-bundles-analytics

  public static MetricRegistry getOrCreate(String name) {
    final MetricRegistry existing = REGISTRIES.get(name);
    if (existing == null) {
      final MetricRegistry created = new MetricRegistry();
      final MetricRegistry raced = add(name, created);
      if (raced == null) {
        return created;
      }
      return raced;
    }
    return existing;
  }
}
origin: com.codahale.metrics/metrics-core

  public static MetricRegistry getOrCreate(String name) {
    final MetricRegistry existing = REGISTRIES.get(name);
    if (existing == null) {
      final MetricRegistry created = new MetricRegistry();
      final MetricRegistry raced = add(name, created);
      if (raced == null) {
        return created;
      }
      return raced;
    }
    return existing;
  }
}
origin: org.juzu/juzu-doc-extension-examples

@PostConstruct
public void start() {
 SharedMetricRegistries.add(application.getPackageName(), registry);
}
// end::start[]
origin: dropwizard-jobs/dropwizard-jobs

@Override
public void initialize(Bootstrap<?> bootstrap) {
  // add shared metrics registry to be used by Jobs, since defaultRegistry
  // has been removed
  SharedMetricRegistries.add(Job.DROPWIZARD_JOBS_KEY, bootstrap.getMetricRegistry());
}
origin: juzu/juzu

@PostConstruct
public void start() {
 SharedMetricRegistries.add(application.getPackageName(), registry);
}
// end::start[]
origin: io.macgyver/macgyver-core

@Bean(name = "macMetricRegistry")
public MacGyverMetricRegistry macMetricRegistry() {
  MacGyverMetricRegistry registry = new MacGyverMetricRegistry();
  SharedMetricRegistries.add("macMetricRegistry", registry);
  Slf4jReporter r = Slf4jReporter.forRegistry(registry)
      .withLoggingLevel(LoggingLevel.DEBUG)
      .convertDurationsTo(TimeUnit.MILLISECONDS)
      .convertRatesTo(TimeUnit.SECONDS)
      .outputTo(LoggerFactory.getLogger("io.macgyver.metrics"))
      .build();
  r.start(60, TimeUnit.SECONDS);
  return registry;
}
origin: org.lwapp/lwapp-dropwizard-core

@Override
public final void run(final T config, final Environment environment) throws Exception {
  SharedMetricRegistries.add("matrix", environment.metrics());
  environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
  environment.getObjectMapper().setSerializationInclusion(Include.NON_NULL);
origin: io.vertx/vertx-metrics

MetricRegistry other = SharedMetricRegistries.add(metricsOptions.getName(), registry);
if (other != null && other instanceof Registry) {
 registry = (Registry) other;
origin: io.vertx/vertx-dropwizard-metrics

boolean shutdown = true;
if (metricsOptions.getRegistryName() != null) {
 MetricRegistry other = SharedMetricRegistries.add(metricsOptions.getRegistryName(), registry);
 if (other != null) {
  registry = other;
origin: signalapp/PushServer

@Override
public void run(PushServerConfiguration config, Environment environment) throws Exception {
 SharedMetricRegistries.add(Constants.METRICS_NAME, environment.metrics());
 environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 JedisPool           redisClient         = new RedisClientFactory(config.getRedisConfiguration()).getRedisClientPool();
 ServerAuthenticator serverAuthenticator = new ServerAuthenticator(config.getAuthenticationConfiguration());
 List<Server>        servers             = config.getAuthenticationConfiguration().getServers();
 UnregisteredQueue   apnQueue            = new UnregisteredQueue(redisClient, environment.getObjectMapper(), servers, "apn");
 UnregisteredQueue   gcmQueue            = new UnregisteredQueue(redisClient, environment.getObjectMapper(), servers, "gcm");
 APNSender apnSender = initializeApnSender(redisClient, apnQueue, config.getApnConfiguration());
 GCMSender gcmSender = initializeGcmSender(gcmQueue, config.getGcmConfiguration());
 environment.lifecycle().manage(apnSender);
 environment.lifecycle().manage(gcmSender);
 environment.jersey().register(AuthFactory.binder(new BasicAuthFactory<>(serverAuthenticator, "PushServer", Server.class)));
 environment.jersey().register(new PushController(apnSender, gcmSender));
 environment.jersey().register(new FeedbackController(gcmQueue, apnQueue));
 environment.healthChecks().register("Redis", new RedisHealthCheck(redisClient));
}
com.codahale.metricsSharedMetricRegistriesadd

Popular methods of SharedMetricRegistries

  • getOrCreate
  • clear
  • setDefault
    Sets the provided registry as the default one under the provided name
  • tryGetDefault
    Same as #getDefault() except returns null when the default registry has not been set.
  • getDefault
    Gets the name of the default registry, if it has been set
  • names
  • remove

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now