public class Lock extends StateManager
modifyingActions, objectModel, objectUid, usingActions
Constructor and Description |
---|
Lock()
Create a new lock.
|
Lock(int lm)
Create a new Lock object and initialise it.
|
Lock(Uid storeUid)
This is used when re-initialising a Lock after retrieval from the object
store.
|
Modifier and Type | Method and Description |
---|---|
void |
changeHierarchy(ActionHierarchy newOwner)
Change the transaction hierarchy associated with the lock to that
provided.
|
boolean |
conflictsWith(Lock otherLock)
Implementation of Lock conflict check.
|
boolean |
equals(Lock otherLock)
Are the two locks equal?
|
boolean |
equals(Object otherLock)
Overrides Object.equals()
|
void |
finalize()
General clean up as Lock is deleted.
|
ActionHierarchy |
getAllOwners() |
Uid |
getCurrentOwner() |
int |
getCurrentStatus() |
protected Lock |
getLink()
Get the next lock in the chain.
|
int |
getLockMode() |
boolean |
modifiesObject()
Does this lock imply a modification of the object it is applied to? For
example, a READ lock would return false, but a WRITE lock would return
true.
|
void |
print(PrintWriter strm)
functions inherited from StateManager
|
void |
propagate()
Propagate the lock.
|
boolean |
restore_state(InputObjectState os,
int ot)
Carefully restore the state of a Lock.
|
boolean |
save_state(OutputObjectState os,
int ot)
Save the state of a lock object.
|
protected void |
setLink(Lock pointTo)
Set the next lock in the chain.
|
String |
toString()
Overrides Object.toString()
|
String |
type()
Overrides StateManager.type()
|
activate, activate, cleanup, createLists, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getObjectModel, getStore, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, rememberAction, setStatus, setupStore, setupStore, setupStore, status, terminate, tryLockMutex, unlockMutex, unpackHeader
public Lock()
public Lock(int lm)
public Lock(Uid storeUid)
public void finalize() throws Throwable
public final int getLockMode()
LockMode.READ
.public final Uid getCurrentOwner()
public final ActionHierarchy getAllOwners()
public final int getCurrentStatus()
public final void changeHierarchy(ActionHierarchy newOwner)
public final void propagate()
public boolean modifiesObject()
true
if this lock implies the object's state will be
modified, false
otherwise.public boolean conflictsWith(Lock otherLock)
true
if this lock conflicts with the parameter,
false
otherwise.public boolean equals(Object otherLock)
public boolean equals(Lock otherLock)
true
if the locks are equal, false
otherwise.public void print(PrintWriter strm)
print
in class StateManager
public boolean restore_state(InputObjectState os, int ot)
restore_state
in class StateManager
true
if successful, false
otherwise.public boolean save_state(OutputObjectState os, int ot)
save_state
in class StateManager
true
if successful, false
otherwise.public String type()
type
in class StateManager
protected Lock getLink()
protected void setLink(Lock pointTo)
Copyright © 2013. All Rights Reserved.