public interface MultiLevelLock
|Modifier and Type||Method and Description|
Tries to acquire a certain lock level on this lock.
Retuns the highest lock level the specified owner holds on this lock or
Releases any lock levels the specified owner may hold on this lock.
boolean acquire(Object ownerId, int targetLockLevel, boolean wait, boolean reentrant, long timeoutMSecs) throws InterruptedException
ownerId- a unique id identifying the entity that wants to acquire a certain lock level on this lock
targetLockLevel- the lock level to acquire
trueif this method shall block when the desired lock level can not be acquired
trueif lock levels of the same entity acquired earlier should not restrict compatibility with the lock level desired now
timeoutMSecs- if blocking is enabled by the
waitparameter this specifies the maximum wait time in milliseconds
trueif the lock actually was acquired
InterruptedException- when the thread waiting on this method is interrupted
ownerId- a unique id identifying the entity that wants to release all lock levels
trueif the lock actually was released,
falsein case there was no lock held by the owner
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.