public int size() {
        lock.lock();
        try {
            return size;
        } finally {
            lock.unlock();
        }
    }
Returns the size of the accumulator.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/EventAccumulator.java