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.

Author:
Sun Microsystems, Inc.
See Also:
LogOps, OutriggerServerImpl

Method Summary
 void recoverJoinState(StoredObject state)
          Recover the join state from the previous session.
 void recoverRegister(StoredResource registration, String type, StoredObject[] templates)
          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

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

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

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

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

void recoverRegister(StoredResource registration,
                     String type,
                     StoredObject[] templates)
                     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
type - of registration, same value that was passed into corresponding registerOp call
templates - stored from of the logged templates
Throws:
Exception - is thrown if any error occurs recovering the registration
See Also:
LogOps.registerOp(com.sun.jini.outrigger.StorableResource, java.lang.String, com.sun.jini.outrigger.StorableObject[])

recoverTransaction

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

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 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.