int size() {
            lock.lock();
            try {
                return size;
            } finally {
                lock.unlock();
            }
        }
A condition variable for waking up the event handler thread.
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java