public class LockManager extends StateManager
StateManager
Modifier and Type | Field and Description |
---|---|
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 ReentrantLock |
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.
|
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 |
---|---|
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() |
activate, activate, cleanup, createLists, 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 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 ReentrantLock mutex
protected com.arjuna.ats.internal.txoj.LockConflictManager conflictManager
protected static final int DOZE_TIME
protected static final boolean nestedLocking
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)
public void finalize() throws 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()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.