本文整理匯總了Java中com.codahale.metrics.Clock.defaultClock方法的典型用法代碼示例。如果您正苦於以下問題:Java Clock.defaultClock方法的具體用法?Java Clock.defaultClock怎麽用?Java Clock.defaultClock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.codahale.metrics.Clock
的用法示例。
在下文中一共展示了Clock.defaultClock方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ElasticsearchReporter
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private ElasticsearchReporter(MetricRegistry registry, MetricFilter filter, TimeUnit rateUnit,
TimeUnit durationUnit, String host, String port, String indexName, String timestampField) {
super(registry, "elasticsearch-reporter", filter, rateUnit, durationUnit);
this.clock = Clock.defaultClock();
this.connector = new ElasticsearchConnector(host, port, indexName);
this.timestampField = timestampField;
this.timestampFormat = new SimpleDateFormat(timeStampString);
this.localhost = Utils.localHostName();
jsonFactory = new JsonFactory();
indexInitialized = connector.addDefaultMappings();
if (!indexInitialized) {
LOGGER.warn("Failed to initialize Elasticsearch index '" + indexName + "' on " + host + ":" + port);
}
}
示例2: HawkularReporter
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
HawkularReporter(MetricRegistry registry,
HawkularHttpClient hawkularClient,
Optional<String> prefix,
MetricsDecomposer decomposer,
MetricsTagger tagger,
TimeUnit rateUnit,
TimeUnit durationUnit,
MetricFilter filter) {
super(registry, "hawkular-reporter", filter, rateUnit, durationUnit);
this.prefix = prefix;
this.clock = Clock.defaultClock();
this.hawkularClient = hawkularClient;
this.decomposer = decomposer;
this.tagger = tagger;
}
示例3: configureExternalHttpsConnector
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private AbstractConnector configureExternalHttpsConnector() {
logger.info("Creating https connector");
final SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setCertAlias(getConfiguration().getSslConfiguration().getKeyStoreAlias());
sslContextFactory.setKeyStorePath(getConfiguration().getSslConfiguration().getKeyStorePath());
sslContextFactory.setKeyStorePassword(getConfiguration().getSslConfiguration().getKeyStorePassword());
final Integer port = getConfiguration().getSslConfiguration().getPort() != null ?
getConfiguration().getSslConfiguration().getPort() :
getConfiguration().getPort();
final InstrumentedSslSocketConnector connector = new InstrumentedSslSocketConnector(
this.metricRegistry,
port,
sslContextFactory,
Clock.defaultClock());
connector.setName(EXTERNAL_HTTPS_CONNECTOR_NAME);
return connector;
}
示例4: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.clock = Clock.defaultClock();
this.prefix = null;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.filter = MetricFilter.ALL;
}
示例5: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.locale = Locale.getDefault();
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.clock = Clock.defaultClock();
this.filter = MetricFilter.ALL;
}
示例6: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(final MetricRegistry metricRegistry, final AmazonCloudWatchAsync cloudWatchAsyncClient, final String namespace) {
this.metricRegistry = metricRegistry;
this.cloudWatchAsyncClient = cloudWatchAsyncClient;
this.namespace = namespace;
this.percentiles = new Percentile[]{Percentile.P75, Percentile.P95, Percentile.P999};
this.metricFilter = MetricFilter.ALL;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.globalDimensions = new LinkedHashSet<>();
this.cwRateUnit = toStandardUnit(rateUnit);
this.cwDurationUnit = toStandardUnit(durationUnit);
this.clock = Clock.defaultClock();
}
開發者ID:azagniotov,項目名稱:codahale-aggregated-metrics-cloudwatch-reporter,代碼行數:14,代碼來源:CloudWatchReporter.java
示例7: CompositeForwardingTimer
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
public CompositeForwardingTimer(Timer mainDelegate, MetricProvider<Timer> supplementaryMetricProvider) {
Preconditions.checkNotNull(mainDelegate);
Preconditions.checkNotNull(supplementaryMetricProvider);
this.mainDelegate = mainDelegate;
this.supplementaryMetricProvider = supplementaryMetricProvider;
this.clock = Clock.defaultClock();
}
示例8: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
public Builder(MetricRegistry registry) {
this.registry = registry;
this.expansions = Expansion.ALL;
this.clock = Clock.defaultClock();
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.filter = MetricFilter.ALL;
this.metricNameFormatter = new DefaultMetricNameFormatter();
this.tags = new ArrayList<String>();
this.suppress_bad_analytics = true;
}
示例9: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
protected Builder(MetricRegistry registry) {
this.registry = registry;
this.output = System.out;
this.locale = Locale.getDefault();
this.clock = Clock.defaultClock();
this.timeZone = TimeZone.getDefault();
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.filter = MetricFilter.ALL;
this.tags = new LinkedHashMap<String, String>();
}
示例10: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.output = System.out;
this.locale = Locale.getDefault();
this.clock = Clock.defaultClock();
this.timeZone = TimeZone.getDefault();
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.filter = MetricFilter.ALL;
}
示例11: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.clock = Clock.defaultClock();
this.filter = MetricFilter.ALL;
}
示例12: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.clock = Clock.defaultClock();
this.filter = MetricFilter.ALL;
this.timestampUnit = TimeUnit.SECONDS;
}
示例13: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.clock = Clock.defaultClock();
this.filter = MetricFilter.ALL;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
}
示例14: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
private Builder(MetricRegistry registry) {
this.registry = registry;
this.clock = Clock.defaultClock();
this.prefix = null;
this.rateUnit = TimeUnit.SECONDS;
this.durationUnit = TimeUnit.MILLISECONDS;
this.filter = MetricFilter.ALL;
}
示例15: Builder
import com.codahale.metrics.Clock; //導入方法依賴的package包/類
protected Builder() {
this.name = "OutputStreamReporter";
this.output = System.out;
this.locale = Locale.getDefault();
this.clock = Clock.defaultClock();
this.timeZone = TimeZone.getDefault();
}