StatsCounter implementation for use by Cache implementors.
| Modifier and Type | Field and Description |
|---|---|
| private final LongAdder | |
| private final LongAdder | |
| private final LongAdder | |
| private final LongAdder | |
| private final LongAdder | |
| private final LongAdder | |
| private final LongAdder |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | incrementBy(StatsCounter
the counter to increment from other)Increments all counters by the values in |
| private static long | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public CacheStats | snapshot()
Implements com. |
| public String |
| evictionCount | back to summary |
|---|---|
| private final LongAdder evictionCount | |
| evictionWeight | back to summary |
|---|---|
| private final LongAdder evictionWeight | |
| hitCount | back to summary |
|---|---|
| private final LongAdder hitCount | |
| loadFailureCount | back to summary |
|---|---|
| private final LongAdder loadFailureCount | |
| loadSuccessCount | back to summary |
|---|---|
| private final LongAdder loadSuccessCount | |
| missCount | back to summary |
|---|---|
| private final LongAdder missCount | |
| totalLoadTime | back to summary |
|---|---|
| private final LongAdder totalLoadTime | |
| ConcurrentStatsCounter | back to summary |
|---|---|
| public ConcurrentStatsCounter() Constructs an instance with all counts initialized to zero. | |
| incrementBy | back to summary |
|---|---|
| public void incrementBy(StatsCounter other) Increments all counters by the values in
| |
| negativeToMaxValue | back to summary |
|---|---|
| private static long negativeToMaxValue(long value) Returns | |
| recordEviction | back to summary |
|---|---|
public void recordEviction(int weight, RemovalCause cause)
| |
| recordHits | back to summary |
|---|---|
public void recordHits(int count)
| |
| recordLoadFailure | back to summary |
|---|---|
public void recordLoadFailure(long loadTime)
| |
| recordLoadSuccess | back to summary |
|---|---|
public void recordLoadSuccess(long loadTime)
| |
| recordMisses | back to summary |
|---|---|
public void recordMisses(int count)
| |
| snapshot | back to summary |
|---|---|
| public CacheStats snapshot() Implements com. Doc from com. Returns a snapshot of this counter's values. Note that this may be an inconsistent view, as it may be interleaved with update operations. Note the values of the metrics are undefined in case of overflow (though it is guaranteed not to throw an exception). If you require specific handling, we recommend implementing your own stats collector.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |