public abstract class SimpleMonitorableOperation extends Object
| Constructor and Description |
|---|
SimpleMonitorableOperation(Counter.Type type,
TimeUnit timeUnit)
Builds this operation with a new counter of the specified type and time unit.
|
| Modifier and Type | Method and Description |
|---|---|
long |
elapsedTime(TimeUnit timeUnit)
Returns the elapsed time, in a given
TimeUnit. |
Counter |
getCounter() |
protected final Counter counter
public SimpleMonitorableOperation(Counter.Type type, TimeUnit timeUnit)
type - the counter type to createdtimeUnit - the time unit to be setpublic Counter getCounter()
Copyright © 2019. All rights reserved.