public class LockStrategyWTimeout extends Object implements LockStrategy
Constructor and Description |
---|
LockStrategyWTimeout(long timeout,
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, TimeUnit unit)
timeout
- timeout value in the unit givenunit
- unitpublic void acquire(com.espertech.esper.common.internal.util.ManagedReadWriteLock runtimeWideLock) throws LockStrategyException, InterruptedException
LockStrategy
acquire
in interface LockStrategy
runtimeWideLock
- the runtime-wide event processing read-write lockLockStrategyException
- to indicate lock attempt failedInterruptedException
- 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 lockCopyright © 2005–2018. All rights reserved.