@Override
 public void readComplete(int rc, LedgerHandle lh, Enumeration<LedgerEntry> seq, Object ctx) {
   SyncObj x = (SyncObj) ctx;
   if (rc != 0) {
     LOG.error("Failure during add {}", rc);
     x.failureOccurred = true;
   }
   synchronized (x) {
     x.value = true;
     x.ls = seq;
     x.notify();
   }
 }