com.atomikos.persistence.imp
Class VolatileStateRecoveryManager

java.lang.Object
  extended by com.atomikos.persistence.imp.VolatileStateRecoveryManager
All Implemented Interfaces:
FSMPreEnterListener<TxState>, StateRecoveryManager, EventListener

public class VolatileStateRecoveryManager
extends Object
implements StateRecoveryManager, FSMPreEnterListener<TxState>

A volatile recovery manager (one that doesn't support persistent logging and hence doesn't allow recovery after a crash or restart).


Constructor Summary
VolatileStateRecoveryManager()
           
 
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.
 void preEnter(FSMEnterEvent<TxState> event)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolatileStateRecoveryManager

public VolatileStateRecoveryManager()
Method Detail

register

public void register(StateRecoverable<TxState> staterecoverable)
Description copied from interface: StateRecoveryManager
Register a staterecoverable with the recovery manager service.

Specified by:
register in interface StateRecoveryManager
Parameters:
staterecoverable - The object that wants recoverable states.
See Also:
StateRecoveryManager

preEnter

public void preEnter(FSMEnterEvent<TxState> event)
              throws IllegalStateException
Specified by:
preEnter in interface FSMPreEnterListener<TxState>
Throws:
IllegalStateException
See Also:
FSMPreEnterListener

close

public void close()
           throws LogException
Description copied from interface: StateRecoveryManager
Shutdown.

Specified by:
close in interface StateRecoveryManager
Throws:
LogException - For underlying log failure.
See Also:
StateRecoveryManager

recover

public StateRecoverable<TxState> recover(Object id)
                                  throws LogException
Description copied from interface: StateRecoveryManager
Reconstruct an instance of a staterecoverable.

Specified by:
recover in interface StateRecoveryManager
Returns:
StateRecoverable The instance, or null if not found.
Throws:
LogException - If underlying object log fails.
See Also:
StateRecoveryManager

recover

public Vector<StateRecoverable<TxState>> recover()
                                          throws LogException
Description copied from interface: StateRecoveryManager
Recover all recorded recoverable instances in their latest state.

Specified by:
recover in interface StateRecoveryManager
Returns:
Vector A vector of reconstructed StateRecoverables.
Throws:
LogException - If the log fails.
See Also:
StateRecoveryManager

delete

public void delete(Object id)
            throws LogException
Description copied from interface: StateRecoveryManager
Deletes a given image from the underlying logs.

Specified by:
delete in interface StateRecoveryManager
Parameters:
id - The id of the image to delete.
Throws:
LogException - On failure.
See Also:
StateRecoveryManager

init

public void init(Properties properties)
          throws LogException
Description copied from interface: StateRecoveryManager
Initialize the recovery mgr before calling the other methods.

Specified by:
init in interface StateRecoveryManager
Throws:
LogException - If the underlying log fails.


Copyright © 2014. All Rights Reserved.