com.atomikos.persistence
Interface StateRecoveryManager

All Known Implementing Classes:
StateRecoveryManagerImp, VolatileStateRecoveryManager

public interface StateRecoveryManager

A state recovery manager is responsible for reconstructing StateRecoverable instances based on the history.


Method Summary
 void close()
          Shutdown.
 void delete(Object id)
          Deletes a given image from the underlying logs.
 void init(Properties properties)
          Initialize the recovery mgr before calling the other methods.
 Vector<StateRecoverable<TxState>> recover()
          Recover all recorded recoverable instances in their latest state.
 StateRecoverable<TxState> recover(Object id)
          Reconstruct an instance of a staterecoverable.
 void register(StateRecoverable<TxState> staterecoverable)
          Register a staterecoverable with the recovery manager service.
 

Method Detail

recover

Vector<StateRecoverable<TxState>> recover()
                                          throws LogException
Recover all recorded recoverable instances in their latest state.

Returns:
Vector A vector of reconstructed StateRecoverables.
Throws:
LogException - If the log fails.

init

void init(Properties properties)
          throws LogException
Initialize the recovery mgr before calling the other methods.

Throws:
LogException - If the underlying log fails.

register

void register(StateRecoverable<TxState> staterecoverable)
Register a staterecoverable with the recovery manager service.

Parameters:
staterecoverable - The object that wants recoverable states.

recover

StateRecoverable<TxState> recover(Object id)
                                  throws LogException
Reconstruct an instance of a staterecoverable.

Parameters:
Object - The staterecoverable's identifier.
Returns:
StateRecoverable The instance, or null if not found.
Throws:
LogException - If underlying object log fails.

close

void close()
           throws LogException
Shutdown.

Throws:
LogException - For underlying log failure.

delete

void delete(Object id)
            throws LogException
Deletes a given image from the underlying logs.

Parameters:
id - The id of the image to delete.
Throws:
LogException - On failure.


Copyright © 2014. All Rights Reserved.