| 构造器和说明 |
|---|
CounterImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
dec()
Decrement the counter by one.
|
void |
dec(long n)
Decrement the counter by
n. |
long |
getCount()
Returns the counter's current value.
|
void |
inc()
Increment the counter by one.
|
void |
inc(long n)
Increment the counter by
n. |
long |
lastUpdateTime()
Implementation notes:
Recording the last updated time for each update is very expensive according to JMH benchmark,
about 6x slower.
|
public void inc(long n)
n.public void dec(long n)
n.public long getCount()
public long lastUpdateTime()
lastUpdateTime 在接口中 MetricCopyright © 2019. All rights reserved.