| 限定符和类型 | 类和说明 |
|---|---|
static class |
TimerImpl.ContextImpl
A timing context.
|
Timer.Context| 构造器和说明 |
|---|
TimerImpl()
|
TimerImpl(int interval) |
TimerImpl(int interval,
ReservoirType type) |
TimerImpl(Reservoir reservoir,
Clock clock,
int interval) |
TimerImpl(ReservoirType reservoir)
|
TimerImpl(ReservoirType reservoir,
Clock clock,
int interval)
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getCount() |
double |
getFifteenMinuteRate() |
double |
getFiveMinuteRate() |
Map<Long,Long> |
getInstantCount() |
Map<Long,Long> |
getInstantCount(long startTime) |
int |
getInstantCountInterval() |
double |
getMeanRate() |
double |
getOneMinuteRate() |
Snapshot |
getSnapshot() |
long |
lastUpdateTime() |
Timer.Context |
time()
Returns a new
Context. |
<T> T |
time(Callable<T> event)
Times and records the duration of event.
|
void |
update(long duration,
TimeUnit unit)
Adds a recorded duration.
|
public TimerImpl()
public TimerImpl(int interval)
public TimerImpl(int interval,
ReservoirType type)
public TimerImpl(ReservoirType reservoir)
reservoir - the Reservoir implementation the timer should usepublic TimerImpl(ReservoirType reservoir, Clock clock, int interval)
public void update(long duration,
TimeUnit unit)
public Timer.Context time()
Context.public double getFifteenMinuteRate()
getFifteenMinuteRate 在接口中 Meteredpublic double getFiveMinuteRate()
getFiveMinuteRate 在接口中 Meteredpublic double getMeanRate()
getMeanRate 在接口中 Meteredpublic double getOneMinuteRate()
getOneMinuteRate 在接口中 Meteredpublic Map<Long,Long> getInstantCount()
getInstantCount 在接口中 Meteredpublic Snapshot getSnapshot()
getSnapshot 在接口中 Samplingpublic int getInstantCountInterval()
getInstantCountInterval 在接口中 Meteredpublic Map<Long,Long> getInstantCount(long startTime)
getInstantCount 在接口中 Meteredpublic long lastUpdateTime()
lastUpdateTime 在接口中 MetricCopyright © 2019. All rights reserved.