|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface NodeLock
Interface for a lock for nodes.
Method Summary | |
---|---|
boolean |
acquire(java.lang.Object caller,
long timeout,
LockType lock_type)
Deprecated. |
java.util.Set<NodeLock> |
acquireAll(java.lang.Object caller,
long timeout,
LockType lock_type)
Deprecated. Recursively acquire locks for this node and all subnodes, including internal Fqns such as buddy backup subtrees. |
java.util.Set<NodeLock> |
acquireAll(java.lang.Object caller,
long timeout,
LockType lock_type,
boolean excludeInternalFqns)
Deprecated. Same as the overloaded acquire(Object, long, LockType) except that you can
optionally specify that internal Fqns - such as buddy backup subtrees - can be excluded when acquiring locks. |
boolean |
acquireReadLock(java.lang.Object caller,
long timeout)
Deprecated. Acquires a read lock with a timeout period of timeout milliseconds. |
boolean |
acquireWriteLock(java.lang.Object caller,
long timeout)
Deprecated. Acquires a write lock with a timeout of timeout milliseconds. |
Fqn |
getFqn()
Deprecated. |
java.util.Collection<java.lang.Object> |
getReaderOwners()
Deprecated. Returns a copy of the reader lock owner in List. |
java.lang.Object |
getWriterOwner()
Deprecated. Returns the writer lock owner object. |
boolean |
isLocked()
Deprecated. Check if there is a read or write lock |
boolean |
isOwner(java.lang.Object o)
Deprecated. Returns true if the object is the lock owner. |
boolean |
isReadLocked()
Deprecated. Check if there is a read lock. |
boolean |
isWriteLocked()
Deprecated. Check if there is a write lock. |
void |
printLockInfo(java.lang.StringBuilder sb,
int indent)
Deprecated. |
void |
release(java.lang.Object caller)
Deprecated. Releases the lock held by the owner. |
void |
releaseAll()
Deprecated. Releases all locks associated with this instance. |
void |
releaseAll(java.lang.Object owner)
Deprecated. Releases all locks with this owner. |
Method Detail |
---|
Fqn getFqn()
java.util.Collection<java.lang.Object> getReaderOwners()
java.lang.Object getWriterOwner()
boolean acquireWriteLock(java.lang.Object caller, long timeout) throws LockingException, TimeoutException, java.lang.InterruptedException
timeout
milliseconds.
Note that if the current owner owns a read lock, it will be upgraded
automatically. However, if upgrade fails, i.e., timeout, the read lock will
be released automatically.
caller
- Can't be null.timeout
-
LockingException
TimeoutException
java.lang.InterruptedException
boolean acquireReadLock(java.lang.Object caller, long timeout) throws LockingException, TimeoutException, java.lang.InterruptedException
timeout
milliseconds.
caller
- Can't be null.timeout
-
LockingException
TimeoutException
java.lang.InterruptedException
void release(java.lang.Object caller)
caller
- Can't be null.void releaseAll()
void releaseAll(java.lang.Object owner)
boolean isReadLocked()
boolean isWriteLocked()
boolean isLocked()
boolean isOwner(java.lang.Object o)
boolean acquire(java.lang.Object caller, long timeout, LockType lock_type) throws LockingException, TimeoutException, java.lang.InterruptedException
LockingException
TimeoutException
java.lang.InterruptedException
java.util.Set<NodeLock> acquireAll(java.lang.Object caller, long timeout, LockType lock_type) throws LockingException, TimeoutException, java.lang.InterruptedException
caller
- lock ownertimeout
- time to waitlock_type
- type of lock
LockingException
TimeoutException
java.lang.InterruptedException
java.util.Set<NodeLock> acquireAll(java.lang.Object caller, long timeout, LockType lock_type, boolean excludeInternalFqns) throws LockingException, TimeoutException, java.lang.InterruptedException
acquire(Object, long, LockType)
except that you can
optionally specify that internal Fqns - such as buddy backup subtrees - can be excluded when acquiring locks.
caller
- lock ownertimeout
- time to waitlock_type
- type of lockexcludeInternalFqns
- if true, locks on internal fqns are not acquired.
LockingException
TimeoutException
java.lang.InterruptedException
void printLockInfo(java.lang.StringBuilder sb, int indent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |