public class TableStoreWriteLock extends AbstractTSQueueLock implements WriteLock
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, toString
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 © 2021. All rights reserved.