Class RowLock


  • public final class RowLock
    extends java.lang.Object
    A RowLock represents a qualifier that is to be used when locking a Row through a RecordHandle.
    MT - Immutable
    See Also:
    RecordHandle, LockingPolicy
    • Field Detail

      • type

        private final int type
        Integer representation of the type of the lock.
      • typeBit

        private final int typeBit
        Bit mask with one bit set. The position of the bit tells the type of the lock.
      • compat

        private final int compat
        Bit mask which represents the lock types that are compatible with this lock type.
      • shortnames

        private static final java.lang.String[] shortnames
      • R_COMPAT

        private static final boolean[][] R_COMPAT
        Row lock compatibility table.
      • RS2

        public static final RowLock RS2
      • RS3

        public static final RowLock RS3
      • RU2

        public static final RowLock RU2
      • RU3

        public static final RowLock RU3
      • RIP

        public static final RowLock RIP
      • RI

        public static final RowLock RI
      • RX2

        public static final RowLock RX2
      • RX3

        public static final RowLock RX3
      • DIAG_CONTAINERID

        public static final java.lang.String DIAG_CONTAINERID
        See Also:
        Constant Field Values
    • Constructor Detail

      • RowLock

        private RowLock​(int type)
    • Method Detail

      • getType

        public int getType()
        Get an integer representation of the type of the lock. This method is guaranteed to return an integer >= 0 and < R_NUMBER. No correlation between the value and one of the static variables (CIS etc.) is guaranteed, except that the values returned do not change.
      • isCompatible

        public boolean isCompatible​(RowLock granted)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object