Example #1
0
  /**
   * Close this PersistentStore without destroying its contents
   *
   * @throws IOException If file system access errors are encountered
   */
  public void close() throws IOException {
    try {
      // Using write lock because we want an exclusive lock
      mutatorLock.writeLock();
      updateCount = 0;

      // Don't need to sync on this because
      // mutatorLock.writeLock() gives us an exclusive lock
      log.close();
    } finally {
      // Using write lock because we want an exclusive lock
      mutatorLock.writeUnlock();
    }
  }