|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.arjuna.StateManager com.arjuna.ats.txoj.LockManager
This class provides (transactional) concurrency control for application objects.
StateManager
Field Summary | |
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 LockManagerAttribute |
lmAttributes
|
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, objectName, objectUid, smAttributes, usingActions |
Constructor Summary | |
protected |
LockManager()
|
protected |
LockManager(int ot)
|
protected |
LockManager(int ot,
ObjectName attr)
|
protected |
LockManager(Uid storeUid)
|
protected |
LockManager(Uid storeUid,
int ot)
|
protected |
LockManager(Uid storeUid,
int ot,
ObjectName attr)
|
protected |
LockManager(Uid storeUid,
ObjectName attr)
|
Method Summary | |
java.lang.Object |
attributes()
|
void |
finalize()
Cleanup. |
void |
print(java.io.PrintWriter strm)
Print information about this instance on the specified PrintWriter . |
void |
printState(java.io.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. |
java.lang.String |
type()
Overload StateManager.type() |
Methods inherited from class com.arjuna.ats.arjuna.StateManager |
activate, activate, cleanup, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getStore, getStoreRoot, loadObjectState, lockMutex, modified, ObjectType, packHeader, persist, rememberAction, restore_state, save_state, setStatus, 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 LockManagerAttribute lmAttributes
Constructor Detail |
protected LockManager(Uid storeUid)
protected LockManager(Uid storeUid, ObjectName attr)
protected LockManager(Uid storeUid, int ot)
protected LockManager(Uid storeUid, int ot, ObjectName attr)
protected LockManager()
protected LockManager(int ot)
protected LockManager(int ot, ObjectName attr)
Method Detail |
public void finalize() throws java.lang.Throwable
finalize
in class StateManager
java.lang.Throwable
public final 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 final int setlock(Lock toSet, int retry, int sleepTime)
public void print(java.io.PrintWriter strm)
PrintWriter
.
print
in class StateManager
public void printState(java.io.PrintWriter strm)
public java.lang.String type()
type
in class StateManager
public java.lang.Object attributes()
attributes
in class StateManager
LockManagerAttribute
object for this
instance. Must be returned as an Object
because it
overrides StateManager.attributes.LockManagerAttribute
protected void terminate()
terminate
in class StateManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |