|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arjuna.ats.arjuna.StateManager
com.arjuna.ats.txoj.LockManager
public class LockManager
This class provides (transactional) concurrency control for application objects.
StateManager
Field Summary | |
---|---|
protected com.arjuna.ats.internal.txoj.LockConflictManager |
conflictManager
|
static int |
defaultRetry
The default retry value which will be used by setlock if no other value is given. |
static int |
defaultSleepTime
The default timeout value which will be used by setlock if no other value is given. |
protected static int |
DOZE_TIME
|
protected boolean |
hasBeenLocked
|
protected com.arjuna.ats.internal.txoj.LockList |
locksHeld
|
protected Object |
locksHeldLockObject
|
protected LockStore |
lockStore
|
protected String |
lockStoreType
|
protected com.arjuna.ats.internal.arjuna.common.BasicMutex |
mutex
|
protected static boolean |
nestedLocking
|
protected boolean |
objectLocked
|
protected boolean |
stateLoaded
|
protected String |
systemKey
|
static int |
waitTotalTimeout
By default, threads which call setlock with conflicting locks will spin for the specified (or default) number of timeout and retry attempts, and then return failure if the lock could not be acquired. |
Fields inherited from class com.arjuna.ats.arjuna.StateManager |
---|
modifyingActions, objectModel, objectUid, usingActions |
Constructor Summary | |
---|---|
protected |
LockManager()
|
protected |
LockManager(int ot)
|
protected |
LockManager(int ot,
int om)
|
protected |
LockManager(Uid storeUid)
|
protected |
LockManager(Uid storeUid,
int ot)
|
protected |
LockManager(Uid storeUid,
int ot,
int om)
|
Method Summary | |
---|---|
protected void |
cleanUp()
|
protected boolean |
doRelease(Uid u,
boolean all)
|
void |
finalize()
Cleanup. |
protected void |
freeState()
|
protected boolean |
initialise()
|
protected boolean |
isAncestorOf(Lock heldLock)
|
protected boolean |
loadState()
|
protected int |
lockConflict(Lock otherLock)
|
void |
print(PrintWriter strm)
Print information about this instance on the specified PrintWriter . |
void |
printState(PrintWriter strm)
Load state into object prior to doing the printing. |
boolean |
propagate(Uid from,
Uid to)
Change lock ownership as nested action commits. |
boolean |
releaseAll(Uid actionUid)
Clear out all locks for a given action. |
boolean |
releaselock(Uid lockUid)
Release a SINGLE LOCK lock that has the given uid. |
int |
setlock(Lock toSet)
|
int |
setlock(Lock toSet,
int retry)
|
int |
setlock(Lock toSet,
int retry,
int sleepTime)
|
protected void |
terminate()
This method *must* be called in the finalizer of every object. |
String |
type()
Overload StateManager.type() |
protected boolean |
unloadState()
|
Methods inherited from class com.arjuna.ats.arjuna.StateManager |
---|
activate, activate, cleanup, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getObjectModel, getStore, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, rememberAction, restore_state, save_state, setStatus, setupStore, setupStore, setupStore, status, tryLockMutex, unlockMutex, unpackHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int defaultRetry
setlock(com.arjuna.ats.txoj.Lock)
,
Constant Field Valuespublic static final int defaultSleepTime
setlock(com.arjuna.ats.txoj.Lock)
,
Constant Field Valuespublic static final int waitTotalTimeout
setlock(com.arjuna.ats.txoj.Lock)
,
Constant Field Valuesprotected String lockStoreType
protected String systemKey
protected com.arjuna.ats.internal.txoj.LockList locksHeld
protected final Object locksHeldLockObject
protected LockStore lockStore
protected boolean stateLoaded
protected boolean hasBeenLocked
protected boolean objectLocked
protected com.arjuna.ats.internal.arjuna.common.BasicMutex mutex
protected com.arjuna.ats.internal.txoj.LockConflictManager conflictManager
protected static final int DOZE_TIME
protected static boolean nestedLocking
Constructor Detail |
---|
protected LockManager(Uid storeUid)
protected LockManager(Uid storeUid, int ot)
protected LockManager(Uid storeUid, int ot, int om)
protected LockManager()
protected LockManager(int ot)
protected LockManager(int ot, int om)
Method Detail |
---|
public void finalize() throws Throwable
finalize
in class Object
Throwable
public boolean propagate(Uid from, Uid to)
public final boolean releaseAll(Uid actionUid)
public final boolean releaselock(Uid lockUid)
public final int setlock(Lock toSet)
public final int setlock(Lock toSet, int retry)
public int setlock(Lock toSet, int retry, int sleepTime)
public void print(PrintWriter strm)
PrintWriter
.
print
in class StateManager
public void printState(PrintWriter strm)
public String type()
type
in class StateManager
protected void terminate()
terminate
in class StateManager
protected final void cleanUp()
protected boolean doRelease(Uid u, boolean all)
protected final void freeState()
protected final boolean initialise()
protected final boolean isAncestorOf(Lock heldLock)
protected final boolean loadState()
protected final int lockConflict(Lock otherLock)
protected final boolean unloadState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |