Class CheckpointReadWriteLock


  • public class CheckpointReadWriteLock
    extends Object
    Wrapper of the classic read write lock with checkpoint features.
    • Field Detail

      • CHECKPOINT_LOCK_HOLD_COUNT

        public static final ThreadLocal<Integer> CHECKPOINT_LOCK_HOLD_COUNT
        Checkpoint lock hold count.
    • Method Detail

      • readLock

        public void readLock()
        Gets the checkpoint read lock. While this lock is held, checkpoint thread will not acquireSnapshotWorker memory state.
        Throws:
        IgniteException - If failed.
      • checkpointLockIsHeldByThread

        public boolean checkpointLockIsHeldByThread()
        This method works only if the assertion is enabled or it always returns true otherwise.
        Returns:
        true if checkpoint lock is held by current thread.
      • readUnlock

        public void readUnlock()
        Releases the checkpoint read lock.
      • writeLock

        public void writeLock()
        Take the checkpoint write lock.
      • isWriteLockHeldByCurrentThread

        public boolean isWriteLockHeldByCurrentThread()
        Returns:
        true if current thread hold the write lock.
      • writeUnlock

        public void writeUnlock()
        Release the checkpoint write lock
      • getReadHoldCount

        public int getReadHoldCount()