|
@@ -11,14 +11,14 @@ public abstract class AbstractCounterManager implements CounterManager {
|
|
|
private final Map<String, Counter> counterStore = new HashMap<>(128);
|
|
|
|
|
|
@Override
|
|
|
- public Counter getCounter(String name, long initValue) {
|
|
|
+ public Counter getCounter(String name) {
|
|
|
Counter counter = counterStore.get(name);
|
|
|
if (counter != null)
|
|
|
return counter;
|
|
|
synchronized (counterStore) {
|
|
|
- return counterStore.computeIfAbsent(name, k -> this.createCount(name, initValue));
|
|
|
+ return counterStore.computeIfAbsent(name, this::createCount);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- protected abstract Counter createCount(String name, long initValue);
|
|
|
+ protected abstract Counter createCount(String name);
|
|
|
}
|