Package org.apache.heron.spi.statemgr
Interface Lock
-
public interface Lock
Interface for a shared lock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
tryLock(long timeout, TimeUnit unit)
Wait until timeout for a lock to be available.void
unlock()
Release the lock.
-
-
-
Method Detail
-
tryLock
boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException
Wait 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.
-
-