Class PageLockTracker<T extends PageLockDump>

    • Field Detail

      • READ_LOCK

        public static final int READ_LOCK
        Page read lock operation id.
        See Also:
        Constant Field Values
      • READ_UNLOCK

        public static final int READ_UNLOCK
        Page read unlock operation id.
        See Also:
        Constant Field Values
      • WRITE_LOCK

        public static final int WRITE_LOCK
        Page write lock operation id.
        See Also:
        Constant Field Values
      • WRITE_UNLOCK

        public static final int WRITE_UNLOCK
        Page write unlock operation id.
        See Also:
        Constant Field Values
      • BEFORE_READ_LOCK

        public static final int BEFORE_READ_LOCK
        Page read before lock operation id.
        See Also:
        Constant Field Values
      • BEFORE_WRITE_LOCK

        public static final int BEFORE_WRITE_LOCK
        Page write before lock operation id.
        See Also:
        Constant Field Values
      • name

        protected final String name
      • heldLockCnt

        protected int heldLockCnt
        Counter for track lock/unlock operations.
      • nextOp

        protected int nextOp
      • nextOpStructureId

        protected int nextOpStructureId
      • nextOpPageId

        protected long nextOpPageId
    • Method Detail

      • onBeforeWriteLock0

        public void onBeforeWriteLock0​(int structureId,
                                       long pageId,
                                       long page)
      • onBeforeReadLock0

        public void onBeforeReadLock0​(int structureId,
                                      long pageId,
                                      long page)
      • onBeforeWriteLock

        public void onBeforeWriteLock​(int structureId,
                                      long pageId,
                                      long page)
        Specified by:
        onBeforeWriteLock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
      • onWriteLock

        public void onWriteLock​(int structureId,
                                long pageId,
                                long page,
                                long pageAddr)
        Specified by:
        onWriteLock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
        pageAddr - Page address.
      • onWriteUnlock

        public void onWriteUnlock​(int structureId,
                                  long pageId,
                                  long page,
                                  long pageAddr)
        Specified by:
        onWriteUnlock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
        pageAddr - Page address.
      • onBeforeReadLock

        public void onBeforeReadLock​(int structureId,
                                     long pageId,
                                     long page)
        Specified by:
        onBeforeReadLock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
      • onReadLock

        public void onReadLock​(int structureId,
                               long pageId,
                               long page,
                               long pageAddr)
        Specified by:
        onReadLock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
        pageAddr - Page address.
      • onReadUnlock

        public void onReadUnlock​(int structureId,
                                 long pageId,
                                 long page,
                                 long pageAddr)
        Specified by:
        onReadUnlock in interface PageLockListener
        Parameters:
        structureId - Cache ID.
        pageId - Page ID.
        page - Page pointer.
        pageAddr - Page address.
      • onWriteLock0

        public abstract void onWriteLock0​(int structureId,
                                          long pageId,
                                          long page,
                                          long pageAddr)
      • onWriteUnlock0

        public abstract void onWriteUnlock0​(int structureId,
                                            long pageId,
                                            long page,
                                            long pageAddr)
      • onReadLock0

        public abstract void onReadLock0​(int structureId,
                                         long pageId,
                                         long page,
                                         long pageAddr)
      • onReadUnlock0

        public abstract void onReadUnlock0​(int structureId,
                                           long pageId,
                                           long page,
                                           long pageAddr)
      • isInvalid

        public boolean isInvalid()
      • invalid

        protected void invalid​(String msg)
      • operationsCounter

        public long operationsCounter()
        Returns:
        Number of locks operations.
      • heldLocksNumber

        public int heldLocksNumber()
      • validateOperation

        protected boolean validateOperation​(int structureId,
                                            long pageId,
                                            int op)
      • snapshot

        protected abstract T snapshot()
      • argsToString

        public static String argsToString​(int structureId,
                                          long pageId,
                                          int flags)
      • pageIdToString

        public static String pageIdToString​(long pageId)