Package org.apache.derby.iapi.store.raw
Class RowLock
- java.lang.Object
-
- org.apache.derby.iapi.store.raw.RowLock
-
public final class RowLock extends java.lang.ObjectA RowLock represents a qualifier that is to be used when locking a Row through a RecordHandle.
MT - Immutable- See Also:
RecordHandle,LockingPolicy
-
-
Field Summary
Fields Modifier and Type Field Description private intcompatBit mask which represents the lock types that are compatible with this lock type.static java.lang.StringDIAG_CONGLOMIDstatic java.lang.StringDIAG_CONTAINERIDstatic java.lang.StringDIAG_COUNTstatic java.lang.StringDIAG_GROUPstatic java.lang.StringDIAG_INDEXstatic java.lang.StringDIAG_LOCKMODEstatic java.lang.StringDIAG_LOCKTYPEstatic java.lang.StringDIAG_PAGENUMstatic java.lang.StringDIAG_RECIDstatic java.lang.StringDIAG_SEGMENTIDstatic java.lang.StringDIAG_STATEstatic java.lang.StringDIAG_XACTIDprivate static boolean[][]R_COMPATRow lock compatibility table.static intR_NUMBERNumber of row locks.static RowLockRIstatic RowLockRIPstatic RowLockRS2static RowLockRS3static RowLockRU2static RowLockRU3static RowLockRX2static RowLockRX3private static java.lang.String[]shortnamesprivate inttypeInteger representation of the type of the lock.private inttypeBitBit mask with one bit set.
-
Constructor Summary
Constructors Modifier Constructor Description privateRowLock(int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetType()Get an integer representation of the type of the lock.booleanisCompatible(RowLock granted)java.lang.StringtoString()
-
-
-
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_NUMBER
public static final int R_NUMBER
Number of row locks.- See Also:
- Constant Field Values
-
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_INDEX
public static final java.lang.String DIAG_INDEX
- See Also:
- Constant Field Values
-
DIAG_XACTID
public static final java.lang.String DIAG_XACTID
- See Also:
- Constant Field Values
-
DIAG_LOCKTYPE
public static final java.lang.String DIAG_LOCKTYPE
- See Also:
- Constant Field Values
-
DIAG_LOCKMODE
public static final java.lang.String DIAG_LOCKMODE
- See Also:
- Constant Field Values
-
DIAG_CONGLOMID
public static final java.lang.String DIAG_CONGLOMID
- See Also:
- Constant Field Values
-
DIAG_CONTAINERID
public static final java.lang.String DIAG_CONTAINERID
- See Also:
- Constant Field Values
-
DIAG_SEGMENTID
public static final java.lang.String DIAG_SEGMENTID
- See Also:
- Constant Field Values
-
DIAG_PAGENUM
public static final java.lang.String DIAG_PAGENUM
- See Also:
- Constant Field Values
-
DIAG_RECID
public static final java.lang.String DIAG_RECID
- See Also:
- Constant Field Values
-
DIAG_COUNT
public static final java.lang.String DIAG_COUNT
- See Also:
- Constant Field Values
-
DIAG_GROUP
public static final java.lang.String DIAG_GROUP
- See Also:
- Constant Field Values
-
DIAG_STATE
public static final java.lang.String DIAG_STATE
- See Also:
- Constant Field Values
-
-
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:
toStringin classjava.lang.Object
-
-