this.counter = counter;
}
public synchronized void take() {
if (called == 3 || called == -1) {
final DefaultCounter defaultCounter = DefaultCounter.class.cast(counter);
final Lock lock = defaultCounter.getLock().writeLock();
lock.lock();
try {
final OptimizedStatistics statistics = defaultCounter.getStatistics();
max = statistics.getMax();
sum = statistics.getSum();
hits = statistics.getN();
counter.reset();
} finally {