public class HGLock
extends java.lang.Object
implements java.util.concurrent.locks.ReadWriteLock
An implementation of ReadWriteLock
that will use the currently
active database transaction if there is one (through BDBTxLock
)
or a default ReentrantReadWriteLock
if there is no current transaction.
The implementation is useful for runtime data structures that need protection
from concurrent access and that may or may not participate in a database
transaction.
Constructor and Description |
---|
HGLock(HyperGraph graph,
byte[] objectId)
Deprecated.
|
public HGLock(HyperGraph graph, byte[] objectId)
public java.util.concurrent.locks.Lock readLock()
readLock
in interface java.util.concurrent.locks.ReadWriteLock
public java.util.concurrent.locks.Lock writeLock()
writeLock
in interface java.util.concurrent.locks.ReadWriteLock