/** * Get a {@link ContextAwareHistogram} with a given name. * * @param name name of the {@link ContextAwareHistogram} * @return the {@link ContextAwareHistogram} with the given name */ public ContextAwareHistogram contextAwareHistogram(String name) { return this.innerMetricContext.getOrCreate(name, ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_HISTOGRAM_FACTORY); }
/** * Get a {@link ContextAwareCounter} with a given name. * * @param name name of the {@link ContextAwareCounter} * @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareCounter}s * @return the {@link ContextAwareCounter} with the given name */ public ContextAwareCounter contextAwareCounter(String name, ContextAwareMetricFactory<ContextAwareCounter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
/** * Get a {@link ContextAwareTimer} with a given name. * * @param name name of the {@link ContextAwareTimer} * @return the {@link ContextAwareTimer} with the given name */ public ContextAwareTimer contextAwareTimer(String name) { return this.innerMetricContext.getOrCreate(name, ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_TIMER_FACTORY); }
/** * Get a {@link ContextAwareMeter} with a given name. * * @param name name of the {@link ContextAwareMeter} * @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareMeter}s * @return the {@link ContextAwareMeter} with the given name */ public ContextAwareMeter contextAwareMeter(String name, ContextAwareMetricFactory<ContextAwareMeter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
/** * Get a {@link ContextAwareTimer} with a given name and a customized {@link com.codahale.metrics.SlidingTimeWindowReservoir} * * @param name name of the {@link ContextAwareTimer} * @param windowSize normally the duration of the time window * @param unit the unit of time * @return the {@link ContextAwareTimer} with the given name */ public ContextAwareTimer contextAwareTimer(String name, long windowSize, TimeUnit unit) { ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs args = new ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs( this.innerMetricContext.getMetricContext().get(), name, windowSize, unit); return this.innerMetricContext.getOrCreate(ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_TIMER_FACTORY, args); }
/** * Get a {@link ContextAwareHistogram} with a given name and a customized {@link com.codahale.metrics.SlidingTimeWindowReservoir} * * @param name name of the {@link ContextAwareHistogram} * @param windowSize normally the duration of the time window * @param unit the unit of time * @return the {@link ContextAwareHistogram} with the given name */ public ContextAwareHistogram contextAwareHistogram(String name, long windowSize, TimeUnit unit) { ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs args = new ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs( this.innerMetricContext.getMetricContext().get(), name, windowSize, unit); return this.innerMetricContext.getOrCreate(ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_HISTOGRAM_FACTORY, args); }
/** * Get a {@link ContextAwareTimer} with a given name. * * @param name name of the {@link ContextAwareTimer} * @return the {@link ContextAwareTimer} with the given name */ public ContextAwareTimer contextAwareTimer(String name) { return this.innerMetricContext.getOrCreate(name, ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_TIMER_FACTORY); }
/** * Get a {@link ContextAwareMeter} with a given name. * * @param name name of the {@link ContextAwareMeter} * @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareMeter}s * @return the {@link ContextAwareMeter} with the given name */ public ContextAwareMeter contextAwareMeter(String name, ContextAwareMetricFactory<ContextAwareMeter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
/** * Get a {@link ContextAwareHistogram} with a given name. * * @param name name of the {@link ContextAwareHistogram} * @return the {@link ContextAwareHistogram} with the given name */ public ContextAwareHistogram contextAwareHistogram(String name) { return this.innerMetricContext.getOrCreate(name, ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_HISTOGRAM_FACTORY); }
/** * Get a {@link ContextAwareCounter} with a given name. * * @param name name of the {@link ContextAwareCounter} * @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareCounter}s * @return the {@link ContextAwareCounter} with the given name */ public ContextAwareCounter contextAwareCounter(String name, ContextAwareMetricFactory<ContextAwareCounter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
/** * Get a {@link ContextAwareTimer} with a given name and a customized {@link com.codahale.metrics.SlidingTimeWindowReservoir} * * @param name name of the {@link ContextAwareTimer} * @param windowSize normally the duration of the time window * @param unit the unit of time * @return the {@link ContextAwareTimer} with the given name */ public ContextAwareTimer contextAwareTimer(String name, long windowSize, TimeUnit unit) { ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs args = new ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs( this.innerMetricContext.getMetricContext().get(), name, windowSize, unit); return this.innerMetricContext.getOrCreate(ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_TIMER_FACTORY, args); }
/** * Get a {@link ContextAwareHistogram} with a given name and a customized {@link com.codahale.metrics.SlidingTimeWindowReservoir} * * @param name name of the {@link ContextAwareHistogram} * @param windowSize normally the duration of the time window * @param unit the unit of time * @return the {@link ContextAwareHistogram} with the given name */ public ContextAwareHistogram contextAwareHistogram(String name, long windowSize, TimeUnit unit) { ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs args = new ContextAwareMetricFactoryArgs.SlidingTimeWindowArgs( this.innerMetricContext.getMetricContext().get(), name, windowSize, unit); return this.innerMetricContext.getOrCreate(ContextAwareMetricFactory.DEFAULT_CONTEXT_AWARE_HISTOGRAM_FACTORY, args); }