Class ActionStore
java.lang.Object
com.arjuna.ats.arjuna.objectstore.ObjectStore
com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore
com.arjuna.ats.internal.arjuna.objectstore.ActionStore
- All Implemented Interfaces:
BaseStore
,ObjectStoreAPI
,ParticipantStore
,RecoveryStore
,TxLog
The basic transaction log implementation. Uses the no file-level locking
implementation of the file system store since only a single user (the
coordinator) can ever be manipulating the action's state.
- Since:
- JTS 1.0.
- Version:
- $Id: ActionStore.java 2342 2006-03-30 13:06:17Z $
- Author:
- Mark Little (mark@arjuna.com)
-
Field Summary
Fields inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
HIDDINGCHAR, SHADOWCHAR
Fields inherited from class com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
doSync, scanZeroLengthFiles, syncWrites
Fields inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
_objectStoreRoot, shareStatus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
commit_state
(Uid objUid, String tName) Commit a previous write_state operation which was made with the SHADOW StateType argument.int
currentState
(Uid objUid, String tName) boolean
hide_state
(Uid u, String tn) Hide/reveal an object regardless of state.read_committed
(Uid storeUid, String tName) Read the object's committed state.read_uncommitted
(Uid u, String tn) Read the object's shadowed state.boolean
remove_committed
(Uid storeUid, String tName) 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.boolean
write_committed
(Uid storeUid, String tName, OutputObjectState state) Write a new copy of the object's committed state.boolean
write_uncommitted
(Uid u, String tn, OutputObjectState s) Write a copy of the object's uncommitted state.Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore
lock, unlock
Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
genPathName, read_state, remove_state, revealedId, write_state
Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
addToCache, allObjUids, allTypes, allTypes, closeAndUnlock, createHierarchy, exists, getStoreName, openAndLock, removeFromCache, removeFromCache, renameFromTo, renameFromToInternal, supressEntry, synchronousWrites, truncate
Methods inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
allObjUids, fullCommitNeeded, initialise, isType, locateStore, shareState, start, stop, storeDir, storeRoot, sync
-
Constructor Details
-
ActionStore
public ActionStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException - Throws:
ObjectStoreException
-
-
Method Details
-
currentState
- Specified by:
currentState
in interfaceRecoveryStore
- Overrides:
currentState
in classShadowingStore
- Parameters:
objUid
- The object to query.tName
- The type of the object to query.- Returns:
- current state of object. Assumes that genPathName allocates enough extra space to allow extra chars to be added. Action stores only store committed objects
- Throws:
ObjectStoreException
-
commit_state
Commit a previous write_state operation which was made with the SHADOW StateType argument. This is achieved by renaming the shadow and removing the hidden version.- Specified by:
commit_state
in interfaceParticipantStore
- Overrides:
commit_state
in classShadowingStore
- Parameters:
objUid
- The object to work on.tName
- The type of the object to work on.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
hide_state
Description copied from class:ShadowingStore
Hide/reveal an object regardless of state. Hidden objects cannot be read but they can be written (Crash recovery needs this).- Specified by:
hide_state
in interfaceRecoveryStore
- Overrides:
hide_state
in classShadowingStore
- 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
Description copied from interface:RecoveryStore
Reveal a hidden object's state.- Specified by:
reveal_state
in interfaceRecoveryStore
- Overrides:
reveal_state
in classShadowingStore
- 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
Description copied from interface:ParticipantStore
Read the object's committed state.- Specified by:
read_committed
in interfaceParticipantStore
- Specified by:
read_committed
in interfaceRecoveryStore
- Overrides:
read_committed
in classFileSystemStore
- Parameters:
storeUid
- The object to work on.tName
- The type of the object to work on.- Returns:
- the state of the object.
- Throws:
ObjectStoreException
-
read_uncommitted
Description copied from interface:ParticipantStore
Read the object's shadowed state.- Specified by:
read_uncommitted
in interfaceParticipantStore
- Overrides:
read_uncommitted
in classFileSystemStore
- 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
Description copied from interface:TxLog
Remove the object's committed state.- Specified by:
remove_committed
in interfaceTxLog
- Overrides:
remove_committed
in classFileSystemStore
- Parameters:
storeUid
- The object to work on.tName
- The type of the object to work on.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
remove_uncommitted
Description copied from interface:ParticipantStore
Remove the object's uncommitted state.- Specified by:
remove_uncommitted
in interfaceParticipantStore
- Overrides:
remove_uncommitted
in classFileSystemStore
- 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 storeUid, String tName, OutputObjectState state) throws ObjectStoreException Description copied from interface:TxLog
Write a new copy of the object's committed state.- Specified by:
write_committed
in interfaceTxLog
- Overrides:
write_committed
in classFileSystemStore
- Parameters:
storeUid
- The object to work on.tName
- The type of the object to work on.state
- The state to write.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
write_uncommitted
Description copied from interface:ParticipantStore
Write a copy of the object's uncommitted state.- Specified by:
write_uncommitted
in interfaceParticipantStore
- Overrides:
write_uncommitted
in classFileSystemStore
- Parameters:
u
- The object to work on.tn
- The type of the object to work on.s
- The state to write.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-