Top Description Fields Constructors Methods
org.apache.derby.iapi.store.raw

public final Class ContainerLock

extends Object
Class Inheritance

A ContainerLock represents a qualifier that is to be used when locking a container through a ContainerHandle.
MT - Immutable
See Also
ContainerHandle, LockingPolicy

Field Summary

Modifier and TypeField and Description
private static final boolean[][]
C_COMPAT

Container lock compatibility table.

public static final int
C_NUMBER

Number of types of container locks.

public static final ContainerLock
CIS

Container Intent Shared lock

public static final ContainerLock
CIX

Container Intent Exclusive lock

private final int
compat

Bit mask which represents the lock types that are compatible with this lock type.

public static final ContainerLock
CS

Container Shared lock

public static final ContainerLock
CU

Container Update lock

public static final ContainerLock
CX

Container Exclusive lock

private static String[]
private final int
type

Integer representation of the type of the lock.

private final int
typeBit

Bit mask with one bit set.

Constructor Summary

AccessConstructor and Description
private
ContainerLock(int type)

Method Summary

Modifier and TypeMethod and Description
public int
getType()

Get an integer representation of the type of the lock.

public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

C_COMPATback to summary
private static final boolean[][] C_COMPAT

Container lock compatibility table.

C_NUMBERback to summary
public static final int C_NUMBER

Number of types of container locks.

CISback to summary
public static final ContainerLock CIS

Container Intent Shared lock

CIXback to summary
public static final ContainerLock CIX

Container Intent Exclusive lock

compatback to summary
private final int compat

Bit mask which represents the lock types that are compatible with this lock type.

CSback to summary
public static final ContainerLock CS

Container Shared lock

CUback to summary
public static final ContainerLock CU

Container Update lock

CXback to summary
public static final ContainerLock CX

Container Exclusive lock

shortnamesback to summary
private static String[] shortnames
typeback to summary
private final int type

Integer representation of the type of the lock.

typeBitback to summary
private final int typeBit

Bit mask with one bit set. The position of the bit tells the type of the lock.

Constructor Detail

ContainerLockback to summary
private ContainerLock(int type)

Method Detail

getTypeback to summary
public int getType()

Get an integer representation of the type of the lock. This method is guaranteed to return an integer >= 0 and < 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.

isCompatibleback to summary
public boolean isCompatible(ContainerLock granted)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object