示例#1
0
 /**
  * Log an update. Will flush to disk before returning.
  *
  * @param o Update argument
  * @throws IllegalStateException if the current thread does not hold a non-exclusive mutator lock
  * @throws IOException If errors accessing the file system occur
  */
 public void update(Object o) throws IOException {
   final Long lockStateVal = lockState.get();
   if (lockStateVal == null || lockStateVal == 0)
     throw new IllegalStateException(
         "PersistentStrore.update:" + "Must acquire mutator lock before calling update()");
   synchronized (this) {
     log.update(o, true);
     updateCount++;
     snapshotHandler.updatePerformed(updateCount);
   }
 }