* Not API - called when {@link InMemoryObjectStore} is
* {@link InMemoryObjectStore#close() close}d.
*/
public void attach(final PersistenceSession persistenceSession, final ObjectStorePersistedObjects persistedObjects) {
final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();
final IdentifierGeneratorDefault identifierGeneratorDefault = identifierGenerator.underlying(IdentifierGeneratorDefault.class);
if(identifierGeneratorDefault != null) {
identifierGeneratorDefault.resetTo(persistedObjects.getOidGeneratorMemento());
persistedObjects.saveOidGeneratorMemento(identifierGeneratorDefault.getMemento());
}