com.sun.jini.outrigger
Interface Recover

All Known Implementing Classes:
OutriggerServerImpl

public interface Recover

Methods that recover the state of the space after a restart.

See Also:
LogOps, OutriggerServerImpl

Method Summary
 void recoverJoinState(StoredObject state)
          Recover the join state from the previous session.
 void recoverRegister(StoredResource registration, StoredObject template)
          Recover an event registration.
 void recoverSessionId(long sessionId)
          Recover the session id from the previous session.
 void recoverTake(Uuid cookie, Long txnId)
          Recover a take operation.
 void recoverTransaction(Long txnId, StoredObject transaction)
          Recover a prepared transaction.
 void recoverUuid(Uuid uuid)
          Recover the Uuid for the service as a whole.
 void recoverWrite(StoredResource entry, Long txnId)
          Recover a write operation.
 

Method Detail

recoverSessionId

public void recoverSessionId(long sessionId)
Recover the session id from the previous session.

Parameters:
sessionId - is the value of the session id recorded from the last call to booOp
See Also:
LogOps.bootOp(long, long)

recoverJoinState

public void recoverJoinState(StoredObject state)
                      throws Exception
Recover the join state from the previous session.

Parameters:
state - is the stored join state
Throws:
Exception
See Also:
LogOps.joinStateOp(com.sun.jini.outrigger.StorableObject)

recoverWrite

public void recoverWrite(StoredResource entry,
                         Long txnId)
                  throws Exception
Recover a write operation. The recovered entry is the stored form of the entry passed into writeOp. If the original write was done under a transaction, and the transaction was prepared txnId will be non-null.

Parameters:
entry - stored from of the written entry
txnId - transaction identifier or null
Throws:
Exception - is thrown if any error occurs recovering the write
See Also:
LogOps.writeOp(com.sun.jini.outrigger.StorableResource, java.lang.Long)

recoverTake

public void recoverTake(Uuid cookie,
                        Long txnId)
                 throws Exception
Recover a take operation. If the original take was done under a transaction, and the transaction was prepared, txnId will be non-null.

Parameters:
cookie - identifier of the entry to take
txnId - transaction identifier or null
Throws:
Exception - is thrown if any error occurs recovering the take
See Also:
LogOps.takeOp(net.jini.id.Uuid, java.lang.Long)

recoverRegister

public void recoverRegister(StoredResource registration,
                            StoredObject template)
                     throws Exception
Recover an event registration. The recovered registration is the stored form of the registration passed into registerOp. The recovered template is the stored form of the template.

Parameters:
registration - stored from of the logged registration
template - stored from of the logged template
Throws:
Exception - is thrown if any error occurs recovering the registration
See Also:
LogOps.registerOp(com.sun.jini.outrigger.StorableResource, com.sun.jini.outrigger.StorableObject)

recoverTransaction

public void recoverTransaction(Long txnId,
                               StoredObject transaction)
                        throws Exception
Recover a prepared transaction. The recovered transaction is the stored form of the transaction passed into prepareOp.

Parameters:
txnId - transaction identifier
transaction - stored from of the prepared transaction
Throws:
Exception - is thrown if any error occurs recovering the transaction
See Also:
LogOps.prepareOp(java.lang.Long, com.sun.jini.outrigger.StorableObject)

recoverUuid

public void recoverUuid(Uuid uuid)
Recover the Uuid for the service as a whole. Will only be called if a Uuid has be stored during a previous incarnation.

Parameters:
uuid - The Uuid being recovered.
See Also:
LogOps.uuidOp(net.jini.id.Uuid)


Copyright © 2004 Sun Microsystems, Inc. All rights reserved