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() or DXTickStream.tryLock(long) tryLock() } methods of the DXTickStream class.

    • 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.