com.arjuna.ats.arjuna.tools.osb.api.proxy
Class RecoveryStoreProxy

java.lang.Object
  extended by com.arjuna.ats.arjuna.tools.osb.api.proxy.TxLogProxy
      extended by com.arjuna.ats.arjuna.tools.osb.api.proxy.RecoveryStoreProxy
All Implemented Interfaces:
BaseStore, RecoveryStore, TxLog

public class RecoveryStoreProxy
extends TxLogProxy
implements RecoveryStore

Remote proxy to a RecoveryStore


Constructor Summary
RecoveryStoreProxy(RecoveryStoreBeanMBean rsProxy)
           
 
Method Summary
 boolean allObjUids(String type, InputObjectState buff)
           
 boolean allObjUids(String type, InputObjectState buff, int match)
          Obtain all of the Uids for a specified type.
 boolean allTypes(InputObjectState buff)
          Obtain all types of objects stored in the object store.
 int currentState(Uid u, String tn)
           
 boolean hide_state(Uid u, String tn)
          Hide the object's state in the object store.
 boolean isType(Uid u, String tn, int st)
          Is the current state of the object the same as that provided as the last parameter?
 InputObjectState read_committed(Uid u, String tn)
          Read the object's committed state.
 boolean reveal_state(Uid u, String tn)
          Reveal a hidden object's state.
 
Methods inherited from class com.arjuna.ats.arjuna.tools.osb.api.proxy.TxLogProxy
getStoreName, remove_committed, start, stop, sync, write_committed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arjuna.ats.arjuna.objectstore.TxLog
remove_committed, sync, write_committed
 
Methods inherited from interface com.arjuna.ats.arjuna.objectstore.BaseStore
getStoreName, start, stop
 

Constructor Detail

RecoveryStoreProxy

public RecoveryStoreProxy(RecoveryStoreBeanMBean rsProxy)
Method Detail

allObjUids

public boolean allObjUids(String type,
                          InputObjectState buff,
                          int match)
                   throws ObjectStoreException
Description copied from interface: RecoveryStore
Obtain all of the Uids for a specified type.

Specified by:
allObjUids in interface RecoveryStore
Parameters:
type - The type to scan for.
buff - The object state in which to store the Uids
match - The file type to look for (e.g., committed, shadowed). [StateStatus]
Returns:
true if no errors occurred, false otherwise.
Throws:
ObjectStoreException

allObjUids

public boolean allObjUids(String type,
                          InputObjectState buff)
                   throws ObjectStoreException
Specified by:
allObjUids in interface RecoveryStore
Throws:
ObjectStoreException

allTypes

public boolean allTypes(InputObjectState buff)
                 throws ObjectStoreException
Description copied from interface: RecoveryStore
Obtain all types of objects stored in the object store.

Specified by:
allTypes in interface RecoveryStore
Parameters:
buff - The state in which to store the types.
Returns:
true if no errors occurred, false otherwise.
Throws:
ObjectStoreException

currentState

public int currentState(Uid u,
                        String tn)
                 throws ObjectStoreException
Specified by:
currentState in interface RecoveryStore
Parameters:
u - The object to query.
tn - The type of the object to query.
Returns:
the current state of the object's state (e.g., shadowed, committed ...) [StateStatus]
Throws:
ObjectStoreException

hide_state

public boolean hide_state(Uid u,
                          String tn)
                   throws ObjectStoreException
Description copied from interface: RecoveryStore
Hide the object's state in the object store. Used by crash recovery.

Specified by:
hide_state in interface RecoveryStore
Parameters:
u - The object to work on.
tn - The type of the object to work on.
Returns:
true if no errors occurred, false otherwise.
Throws:
ObjectStoreException

reveal_state

public boolean reveal_state(Uid u,
                            String tn)
                     throws ObjectStoreException
Description copied from interface: RecoveryStore
Reveal a hidden object's state.

Specified by:
reveal_state in interface RecoveryStore
Parameters:
u - The object to work on.
tn - The type of the object to work on.
Returns:
true if no errors occurred, false otherwise.
Throws:
ObjectStoreException

read_committed

public InputObjectState read_committed(Uid u,
                                       String tn)
                                throws ObjectStoreException
Description copied from interface: RecoveryStore
Read the object's committed state.

Specified by:
read_committed in interface RecoveryStore
Parameters:
u - The object to work on.
tn - The type of the object to work on.
Returns:
the state of the object.
Throws:
ObjectStoreException

isType

public boolean isType(Uid u,
                      String tn,
                      int st)
               throws ObjectStoreException
Description copied from interface: RecoveryStore
Is the current state of the object the same as that provided as the last parameter?

Specified by:
isType in interface RecoveryStore
Parameters:
u - The object to work on.
tn - The type of the object.
st - The expected type of the object. [StateType]
Returns:
true if the current state is as expected, false otherwise.
Throws:
ObjectStoreException


Copyright © 2011. All Rights Reserved.