Class ContainerLock
java.lang.Object
org.apache.derby.iapi.store.raw.ContainerLock
A ContainerLock represents a qualifier that is to be used when
locking a container through a ContainerHandle.
MT - Immutable
MT - Immutable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean[][]Container lock compatibility table.static final intNumber of types of container locks.static final ContainerLockContainer Intent Shared lockstatic final ContainerLockContainer Intent Exclusive lockprivate final intBit mask which represents the lock types that are compatible with this lock type.static final ContainerLockContainer Shared lockstatic final ContainerLockContainer Update lockstatic final ContainerLockContainer Exclusive lockprivate static String[]private final intInteger representation of the type of the lock.private final intBit mask with one bit set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetType()Get an integer representation of the type of the lock.booleanisCompatible(ContainerLock granted) toString()
-
Field Details
-
type
private final int typeInteger representation of the type of the lock. -
typeBit
private final int typeBitBit mask with one bit set. The position of the bit tells the type of the lock. -
compat
private final int compatBit mask which represents the lock types that are compatible with this lock type. -
C_NUMBER
public static final int C_NUMBERNumber of types of container locks.- See Also:
-
C_COMPAT
private static final boolean[][] C_COMPATContainer lock compatibility table. -
shortnames
-
CIS
Container Intent Shared lock -
CIX
Container Intent Exclusive lock -
CS
Container Shared lock -
CU
Container Update lock -
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
-
toString
-