@SuppressWarnings("SignalWithoutCorrespondingAwait") private void addEntry(Entry entry){
  assert entry != null;
  rwLock.readLock().lock();
  try {
    entries.add(entry);
  }
  finally {
    rwLock.readLock().unlock();
  }
  if (cnt.incrementAndGet() >= batchSize) {
    if (flushLock.tryLock()) {
      try {
        flushCond.signalAll();
      }
  finally {
        flushLock.unlock();
      }
    }
  }
}

@ SuppressWarnings ( "SignalWithoutCorrespondingAwait" ) private void addEntry ( Entry entry ) { assert entry != null ; rwLock . readLock ( ) . lock ( ) ; try { entries . add ( entry ) ; } finally { rwLock . readLock ( ) . unlock ( ) ; } if ( cnt . incrementAndGet ( ) >= batchSize ) { if ( flushLock . tryLock ( ) ) { try { flushCond . signalAll ( ) ; } finally { flushLock . unlock ( ) ; } } } }
add new log entry .
