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 |
forceUnlockOnTimeoutWhen, lock, path, pauser, PID, tableStore, UNLOCK_MAIN_MSG, UNLOCKED, UNLOCKING_FORCIBLY_MSG
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, toString
assertCloseable, assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, forceUnlockIfProcessIsDead, isLockedByCurrentProcess
public 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()
WriteLock
public void forceUnlock()
public void forceUnlockQuietly()
Copyright © 2022. All rights reserved.