protected synchronized void addFromCheckpoint ( ManagedObject managedObject , Transaction transaction ) throws ObjectManagerException { final String methodName = "addFromCheckpoint" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { managedObject , transaction } ) ; // Make the ManagedObject ready for an addition. // Nothing went wrong during forward processing! managedObject . preAdd ( transaction ) ; // Only persistent objects are recovered from a checkpoint. setState ( nextStateForInvolvePersistentObjectFromCheckpoint ) ; // The object is now included in the transaction. includedManagedObjects . put ( managedObject . owningToken , managedObject ) ; // The ManagedObject was read from the ObjectStore, give it a low log // and ManagedObject sequence number so that any later operation will supercede this one. // The loggedSerialisedBytes will be unchanged, possibly null for this Token. // If there already a logSequenceNumber known for this token it must have been put // there after the checkpoint start and has already been superceded. if ( ! logSequenceNumbers . containsKey ( managedObject . owningToken ) ) { logSequenceNumbers . put ( managedObject . owningToken , new Long ( 0 ) ) ; managedObjectSequenceNumbers . put ( managedObject . owningToken , new Long ( 0 ) ) ; } // if (!logSequenceNumbers.containsKey(managedObject.owningToken)). // Redrive the postAdd method for the object. managedObject . postAdd ( transaction , true ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName ) ; }
Recover an Add operation from a checkpoint .