Package deltix.qsrv.hf.tickdb.pub.lock
Interface DBLock
-
- All Known Implementing Classes:
DBLockImpl
public interface DBLock
A token representing a lock on a timebase stream.A lock object is created each time a lock is acquired on a stream via one of the
lock()
orDXTickStream.tryLock(long)
tryLock() } methods of theDXTickStream
class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LockType
getType()
Tells whether this lock is shared.boolean
isValid()
Tells whether or not this lock is valid.void
release()
Releases this lock.
-
-
-
Method Detail
-
getType
LockType getType()
Tells whether this lock is shared.- Returns:
true
if lock is shared,false
if it is exclusive
-
isValid
boolean isValid()
Tells whether or not this lock is valid.A lock object remains valid until it is released or the associated file channel is closed, whichever comes first.
- Returns:
true
if, and only if, this lock is valid.- Throws:
java.lang.IllegalStateException
- if lock is not valid.
-
release
void release()
Releases this lock.If this lock object is valid then invoking this method releases the lock and renders the object invalid. If this lock object is invalid then invoking this method has no effect.
-
-