public class OALock extends Object implements Serializable
Note: setting a lock does not restrict access to an Object, it only serves as a flag. It is currently the applications responsiblity to enforce rules based on a lock being set.
Note: this also works with OASync (Clients/Server) to create distributed locks.
For more information about this package, see documentation.
Modifier and Type | Field and Description |
---|---|
protected Object |
miscObject |
protected Object |
object |
protected WeakReference |
ref |
protected int |
waitCnt |
Modifier | Constructor and Description |
---|---|
protected |
OALock(Object object,
Object refObject,
Object miscObject)
Used for creating a lock on an object.
|
Modifier and Type | Method and Description |
---|---|
Object |
getMiscObject() |
Object |
getObject() |
Object |
getReferenceObject() |
protected Object object
protected transient WeakReference ref
protected Object miscObject
protected int waitCnt
protected OALock(Object object, Object refObject, Object miscObject)
object
- to lockrefObject
- reference object used with a WeakReference.
If it is garbage collected, then the lock is removed.miscObject
- object to store with locked objectCopyright © 1999–2019 ViaOA. All rights reserved.