public class LockManager extends StateManager
StateManager
Modifier and Type | Field and Description |
---|---|
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.
|
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.
|
modifyingActions, objectModel, objectUid, usingActions
Modifier | Constructor and Description |
---|---|
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) |
Modifier and Type | Method and Description |
---|---|
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()
|
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
public static final int defaultRetry
public static final int defaultSleepTime
public static final int waitTotalTimeout
setlock(com.arjuna.ats.txoj.Lock)
,
Constant Field Valuesprotected 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)
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
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
protected void terminate()
terminate
in class StateManager