public class TableStoreWriteLock extends AbstractTSQueueLock implements WriteLock
WARNING: the default behaviour (see also {@code queue.dont.recover.lock.timeout} system property) is for a timed-out lock to be overridden.
| Modifier and Type | Field and Description |
|---|---|
static String |
APPEND_LOCK_KEY |
dontRecoverLockTimeout, lock, path, pauser, PID, tableStore, UNLOCKED| Constructor and Description |
|---|
TableStoreWriteLock(TableStore<?> tableStore,
Supplier<net.openhft.chronicle.threads.TimingPauser> pauser,
Long timeoutMs) |
TableStoreWriteLock(TableStore<?> tableStore,
Supplier<net.openhft.chronicle.threads.TimingPauser> pauser,
Long timeoutMs,
String lockKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
forceUnlock()
Don't use this - for internal use only
|
void |
forceUnlockQuietly()
Don't use this - for internal use only
Does not warn when force unlocked
|
protected @NotNull String |
getLockedBy(long value) |
void |
lock()
Guaranteed to succeed in getting the lock (may involve timeout and recovery) or else throw.
|
boolean |
locked() |
void |
unlock()
May not unlock.
|
forceUnlock, forceUnlockIfProcessIsDead, isLockedByCurrentProcess, lockedBy, performClose, toStringassertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, forceUnlockIfProcessIsDead, isLockedByCurrentProcesspublic static final String APPEND_LOCK_KEY
public TableStoreWriteLock(TableStore<?> tableStore, Supplier<net.openhft.chronicle.threads.TimingPauser> pauser, Long timeoutMs, String lockKey)
public TableStoreWriteLock(TableStore<?> tableStore, Supplier<net.openhft.chronicle.threads.TimingPauser> pauser, Long timeoutMs)
public void lock()
This is not re-entrant i.e. if you lock and try and lock again it will timeout and recover
@NotNull protected @NotNull String getLockedBy(long value)
public void unlock()
WriteLockpublic void forceUnlock()
public void forceUnlockQuietly()
Copyright © 2021. All rights reserved.