public interface SharedLatch
Modifier and Type | Method and Description |
---|---|
void |
acquireExclusive()
Acquire a latch for exclusive/write access.
|
boolean |
acquireExclusiveNoWait()
Probe a latch for exclusive access, but don't block if it's not
available.
|
void |
acquireShared()
Acquire a latch for shared/read access.
|
boolean |
isOwner()
Return true if this thread is an owner, reader, or write.
|
boolean |
isWriteLockedByCurrentThread() |
void |
release()
Release an exclusive or shared latch.
|
void |
releaseIfOwner()
Release the latch.
|
void |
setExclusiveOnly(boolean exclusiveOnly)
Indicate whether this latch can only be set exclusively (not shared).
|
void |
setName(java.lang.String name)
Set the latch name, used for latches in objects instantiated from the
log.
|
boolean |
setNoteLatch(boolean noteLatch)
Indicate whether this latch should be tracked in the debugging
LatchSupport.latchTable.
|
void setName(java.lang.String name)
boolean setNoteLatch(boolean noteLatch)
void setExclusiveOnly(boolean exclusiveOnly)
void acquireExclusive() throws DatabaseException
LatchException
- if the latch is already held by the current
thread for shared access.DatabaseException
boolean acquireExclusiveNoWait() throws DatabaseException
LatchException
- if the latch is already held by the calling
thread.DatabaseException
void acquireShared() throws DatabaseException
RunRecoveryException
- if an InterruptedException exception
occurs.DatabaseException
void release() throws LatchNotHeldException
LatchNotHeldException
boolean isWriteLockedByCurrentThread()
void releaseIfOwner() throws LatchNotHeldException
LatchNotHeldException
boolean isOwner()