Class ContainerLock

java.lang.Object
org.apache.derby.iapi.store.raw.ContainerLock

public final class ContainerLock extends Object
A ContainerLock represents a qualifier that is to be used when locking a container through a ContainerHandle.
MT - Immutable
See Also:
  • Field Details

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

      public static final int C_NUMBER
      Number of types of container locks.
      See Also:
    • C_COMPAT

      private static final boolean[][] C_COMPAT
      Container lock compatibility table.
    • shortnames

      private static String[] shortnames
    • CIS

      public static final ContainerLock CIS
      Container Intent Shared lock
    • CIX

      public static final ContainerLock CIX
      Container Intent Exclusive lock
    • CS

      public static final ContainerLock CS
      Container Shared lock
    • CU

      public static final ContainerLock CU
      Container Update lock
    • CX

      public static final ContainerLock CX
      Container Exclusive lock
  • Constructor Details

    • ContainerLock

      private ContainerLock(int type)
  • Method Details

    • getType

      public int getType()
      Get an integer representation of the type of the lock. This method is guaranteed to return an integer >= 0 and &t; C_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(ContainerLock granted)
    • toString

      public String toString()
      Overrides:
      toString in class Object