Class TwoPhaseVolatileStore
java.lang.Object
com.arjuna.ats.arjuna.objectstore.ObjectStore
com.arjuna.ats.internal.arjuna.objectstore.TwoPhaseVolatileStore
- All Implemented Interfaces:
BaseStore
,ObjectStoreAPI
,ParticipantStore
,RecoveryStore
,TxLog
Two phase volatile store. Allows for recoverable and shared object instances to
participate in a transaction. Does not support all recovery methods that are
specific to persistent (durable) object stores.
- Author:
- marklittle
-
Field Summary
Fields inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
_objectStoreRoot, shareStatus
-
Constructor Summary
ConstructorDescriptionTwoPhaseVolatileStore
(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) -
Method Summary
Modifier and TypeMethodDescriptionboolean
allObjUids
(String s, InputObjectState buff, int m) Obtain all of the Uids for a specified type.boolean
allTypes
(InputObjectState buff) Obtain all types of objects stored in the object store.boolean
commit_state
(Uid u, String tn) Commit the object's state 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.read_committed
(Uid u, String tn) Read the object's committed state.read_uncommitted
(Uid u, String tn) Read the object's shadowed state.boolean
remove_committed
(Uid u, String tn) Remove the object's committed state.boolean
remove_uncommitted
(Uid u, String tn) Remove the object's uncommitted state.boolean
reveal_state
(Uid u, String tn) Reveal a hidden object's state.protected boolean
supressEntry
(String name) Suppress directories of the specified type from allTypes etc?boolean
write_committed
(Uid u, String tn, OutputObjectState buff) Write a new copy of the object's committed state.boolean
write_uncommitted
(Uid u, String tn, OutputObjectState buff) Write a copy of the object's uncommitted state.Methods inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
allObjUids, fullCommitNeeded, initialise, isType, locateStore, revealedId, shareState, start, stop, storeDir, storeRoot, sync
-
Constructor Details
-
TwoPhaseVolatileStore
public TwoPhaseVolatileStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException - Throws:
ObjectStoreException
-
-
Method Details
-
allObjUids
Obtain all of the Uids for a specified type.- Parameters:
s
- The type to scan for.buff
- The object state in which to store the Uidsm
- The file type to look for (e.g., committed, shadowed).- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
allTypes
Obtain all types of objects stored in the object store.- Parameters:
buff
- The state in which to store the types.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
currentState
- 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 ...)
- Throws:
ObjectStoreException
-
getStoreName
- Returns:
- the name of the object store.
-
commit_state
Commit the object's state in the object store.- 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
-
hide_state
Hide the object's state in the object store. Used by crash recovery.- 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
Reveal a hidden object's state.- 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
Read the object's committed state.- Parameters:
u
- The object to work on.tn
- The type of the object to work on.- Returns:
- the state of the object.
- Throws:
ObjectStoreException
-
read_uncommitted
Read the object's shadowed state.- Parameters:
u
- The object to work on.tn
- The type of the object to work on.- Returns:
- the state of the object.
- Throws:
ObjectStoreException
-
remove_committed
Remove the object's committed state.- 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
-
remove_uncommitted
Remove the object's uncommitted state.- 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
-
write_committed
public boolean write_committed(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException Write a new copy of the object's committed state.- Parameters:
u
- The object to work on.tn
- The type of the object to work on.buff
- The state to write.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
write_uncommitted
public boolean write_uncommitted(Uid u, String tn, OutputObjectState buff) throws ObjectStoreException Write a copy of the object's uncommitted state.- Parameters:
u
- The object to work on.tn
- The type of the object to work on.buff
- The state to write.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
supressEntry
Suppress directories of the specified type from allTypes etc?- Specified by:
supressEntry
in classObjectStore
-