Package org.apache.derby.iapi.store.raw
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 int
Number of types of container locks.static final ContainerLock
Container Intent Shared lockstatic final ContainerLock
Container Intent Exclusive lockprivate final int
Bit mask which represents the lock types that are compatible with this lock type.static final ContainerLock
Container Shared lockstatic final ContainerLock
Container Update lockstatic final ContainerLock
Container Exclusive lockprivate static String[]
private final int
Integer representation of the type of the lock.private final int
Bit mask with one bit set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getType()
Get an integer representation of the type of the lock.boolean
isCompatible
(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
-