Package deltix.qsrv.hf.tickdb.pub.lock
Interface DBLock
-
- All Known Implementing Classes:
DBLockImpl
public interface DBLockA 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 theDXTickStreamclass.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LockTypegetType()Tells whether this lock is shared.booleanisValid()Tells whether or not this lock is valid.voidrelease()Releases this lock.
-
-
-
Method Detail
-
getType
LockType getType()
Tells whether this lock is shared.- Returns:
trueif lock is shared,falseif 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:
trueif, 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.
-
-