public class LockStrategyWTimeout extends java.lang.Object implements LockStrategy
Constructor and Description |
---|
LockStrategyWTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
acquire(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
Acquire should acquire the write lock of the provided read-write lock and may retry and backoff or fail.
|
void |
release(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
Release should release the write lock of the provided read-write lock and should never fail.
|
public LockStrategyWTimeout(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- timeout value in the unit givenunit
- unitpublic void acquire(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock) throws LockStrategyException, java.lang.InterruptedException
LockStrategy
acquire
in interface LockStrategy
runtimeWideLock
- the runtime-wide event processing read-write lockLockStrategyException
- to indicate lock attempt failedjava.lang.InterruptedException
- when lock-taking is interruptedpublic void release(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock)
LockStrategy
release
in interface LockStrategy
runtimeWideLock
- the runtime-wide event processing read-write lock