private class BaseGenericObjectPool.StatsStore
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
index |
private int |
size |
private java.util.concurrent.atomic.AtomicLong[] |
values |
| Constructor and Description |
|---|
StatsStore(int size)
Create a StatsStore with the given cache size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value)
Adds a value to the cache.
|
long |
getMean()
Returns the mean of the cached values.
|
private final java.util.concurrent.atomic.AtomicLong[] values
private final int size
private int index
public StatsStore(int size)
size - number of values to maintain in the cache.public void add(long value)
value - new value to add to the cache.public long getMean()