protected void saveClonedState(Transaction transaction)
                    throws ObjectManagerException {
        final String methodName = "saveClonedState";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass, methodName, transaction);

        // Loop over all of the ObjecStores.
        java.util.Iterator objectStoreIterator = objectStores.values()
                        .iterator();
        while (objectStoreIterator.hasNext()) {
            ObjectStore objectStore = (ObjectStore) objectStoreIterator.next();

            // Don't bother with ObjectStores that can't be used for recovery.
            if (objectStore.getContainsRestartData()) {

                // Locate any existing copy.
                Token objectManagerStateCloneToken = new Token(objectStore,
                                                               ObjectStore.objectManagerStateIdentifier.longValue());
                // Swap for the definitive Token, if there is one.
                objectManagerStateCloneToken = objectStore.like(objectManagerStateCloneToken);

                ObjectManagerState objectManagerStateClone = (ObjectManagerState) objectManagerStateCloneToken.getManagedObject();

                // Does the cloned state already exist?
                if (objectManagerStateClone == null) {
                    objectManagerStateClone = new ObjectManagerState();
                    objectManagerStateClone.objectStores = objectStores;
                    objectManagerStateClone.becomeCloneOf(this);
                    objectManagerStateCloneToken.setManagedObject(objectManagerStateClone);
                    transaction.add(objectManagerStateClone);

                } else {
                    transaction.lock(objectManagerStateClone);
                    objectManagerStateClone.objectStores = objectStores;
                    objectManagerStateClone.becomeCloneOf(this);
                    transaction.replace(objectManagerStateClone);
                } //  if (objectManagerStateClone == null).
            } // if (objectStore.getContainsRestartData()).
        } // While objectStoreIterator.hasNext().

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
protected void saveClonedState ( Transaction transaction ) throws ObjectManagerException { final String methodName = "saveClonedState" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , transaction ) ; java . util . Iterator objectStoreIterator = objectStores . values ( ) . iterator ( ) ; while ( objectStoreIterator . hasNext ( ) ) { ObjectStore objectStore = ( ObjectStore ) objectStoreIterator . next ( ) ; if ( objectStore . getContainsRestartData ( ) ) { Token objectManagerStateCloneToken = new Token ( objectStore , ObjectStore . objectManagerStateIdentifier . longValue ( ) ) ; objectManagerStateCloneToken = objectStore . like ( objectManagerStateCloneToken ) ; ObjectManagerState objectManagerStateClone = ( ObjectManagerState ) objectManagerStateCloneToken . getManagedObject ( ) ; if ( objectManagerStateClone == null ) { objectManagerStateClone = new ObjectManagerState ( ) ; objectManagerStateClone . objectStores = objectStores ; objectManagerStateClone . becomeCloneOf ( this ) ; objectManagerStateCloneToken . setManagedObject ( objectManagerStateClone ) ; transaction . add ( objectManagerStateClone ) ; } else { transaction . lock ( objectManagerStateClone ) ; objectManagerStateClone . objectStores = objectStores ; objectManagerStateClone . becomeCloneOf ( this ) ; transaction . replace ( objectManagerStateClone ) ; } } } if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; }
Create or update a copy of the ObjectManagerState in each ObjectStore.
The caller must be synchronised on objectStores.

@param transaction controlling the update.
@throws ObjectManagerException