Package org.apache.heron.spi.statemgr
Interface Lock
-
public interface LockInterface for a shared lock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleantryLock(long timeout, TimeUnit unit)Wait until timeout for a lock to be available.voidunlock()Release the lock.
-
-
-
Method Detail
-
tryLock
boolean tryLock(long timeout, TimeUnit unit) throws InterruptedExceptionWait until timeout for a lock to be available. Return true if lock is obtained or false if it can not be obtained.- Throws:
InterruptedException
-
unlock
void unlock()
Release the lock. Failure to call this method could result in an orphaned lock.
-
-