public class Lock
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
LOCKED_BY_FOREIGN_OBJECT |
static int |
LOCKED_BY_THIS_OBJECT |
static int |
NOT_LOCKED |
Constructor and Description |
---|
Lock(Lockable lockable,
LockOwner owner) |
Modifier and Type | Method and Description |
---|---|
Lockable |
getLockable() |
java.util.Date |
getLockCreated() |
int |
getLockStatus(LockOwner owner)
returns the current lockStatus
|
boolean |
isOwnedBy(LockOwner owner)
checks if this lock is owned by the given owner
|
public static final int NOT_LOCKED
public static final int LOCKED_BY_FOREIGN_OBJECT
public static final int LOCKED_BY_THIS_OBJECT
public java.util.Date getLockCreated()
public boolean isOwnedBy(LockOwner owner)
owner
- public Lockable getLockable()
public int getLockStatus(LockOwner owner)
owner
-