public interface IReadWriteLockManager
Modifier and Type | Method and Description |
---|---|
int |
getReadLockCount()
Return the #of read-locks held by the current thread for a mutable index
view.
|
boolean |
isReadOnly()
Return
true iff the data structure is read-only. |
Lock |
readLock()
Return a
Lock that may be used to obtain a shared read lock which
is used (in the absence of other concurrency control mechanisms) to
permit concurrent readers on an unisolated index while serializing access
to that index when a writer must run. |
Lock |
writeLock()
Return a
Lock that may be used to obtain an exclusive write lock
which is used (in the absence of other concurrency control mechanisms) to
serialize all processes accessing an unisolated index when a writer must
run. |
Lock readLock()
Lock
that may be used to obtain a shared read lock which
is used (in the absence of other concurrency control mechanisms) to
permit concurrent readers on an unisolated index while serializing access
to that index when a writer must run. This is exposed for processes which
need to obtain the write lock to coordinate external operations.
Note: If the persistence capable data structure is read-only then the
returned Lock
is a singleton that ignores all lock requests. This
is because our read-only persistence capable data structures are already
thread-safe for concurrent readers.
Lock writeLock()
Lock
that may be used to obtain an exclusive write lock
which is used (in the absence of other concurrency control mechanisms) to
serialize all processes accessing an unisolated index when a writer must
run. This is exposed for processes which need to obtain the write lock to
coordinate external operations.UnsupportedOperationException
- unless the view supports mutation.int getReadLockCount()
boolean isReadOnly()
true
iff the data structure is read-only.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.