docs: public synchronized void flush()
                      throws ObjectManagerException
      {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this, cclass,
                          "flush");
  
          // Capture the ManagedObjects to write and delete.
          java.util.Map ourManagedObjectsToWrite = managedObjectsToWrite;
          managedObjectsToWrite = new ConcurrentHashMap(concurrency);
          java.util.Map ourTokensToDelete = tokensToDelete;
          tokensToDelete = new ConcurrentHashMap(concurrency);
  
          // Write the managed objects to disk.
          // Use of ConcurrentHashMap makes this a safe copy of the set at the time we construct the iterator.
          java.util.Iterator managedObjectIterator = ourManagedObjectsToWrite.values()
                          .iterator();
          while (managedObjectIterator.hasNext()) {
              ManagedObject managedObject = (ManagedObject) managedObjectIterator.next();
              write(managedObject);
          } // While managedObjectIterator.hasNext().
  
          // Delete the managed objects from disk.
          // Use of ConcurrentHashMap makes this a safe copy of the set at the time we construct the iterator.
          java.util.Iterator tokenIterator = ourTokensToDelete.values()
                          .iterator();
          while (tokenIterator.hasNext()) {
              Token token = (Token) tokenIterator.next();
              if (managedObjectsOnDisk.contains(new Long(token.storedObjectIdentifier))) {
                  java.io.File storeFile = new java.io.File(storeDirectoryName
                                                            + java.io.File.separator
                                                            + token.storedObjectIdentifier);
                  storeFile.delete();
                  managedObjectsOnDisk.remove((new Long(token.storedObjectIdentifier)));
              } // if ... contains.
          } // While tokenIterator.hasNext().
  
          // Write the header and force to disk.
          writeHeader();
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this, cclass,
                         "flush");
      }