Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.store.raw
Class ContainerLock  view ContainerLock download ContainerLock.java

java.lang.Object
  extended byorg.apache.derby.iapi.store.raw.ContainerLock

public final class ContainerLock
extends java.lang.Object

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


Field Summary
private static boolean[][] C_COMPAT
          Container lock compatability table
static int C_NUMBER
          number of types of container locks
static ContainerLock CIS
          Container Intent Shared lock
static ContainerLock CIX
          Container Intent Exclusive lock
static ContainerLock CS
          Container Shared lock
static ContainerLock CU
          Container Update lock
static ContainerLock CX
          Container Exclusive lock
private static java.lang.String[] shortnames
           
private  int type
           
 
Constructor Summary
private ContainerLock(int type)
           
 
Method Summary
 int getType()
          Get an integer representation of the type of the lock.
 boolean isCompatible(ContainerLock granted)
           
 boolean isCompatible(int granted)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private final int type

shortnames

private static java.lang.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


C_NUMBER

public static final int C_NUMBER
number of types of container locks

See Also:
Constant Field Values

C_COMPAT

private static final boolean[][] C_COMPAT
Container lock compatability table

Constructor Detail

ContainerLock

private ContainerLock(int type)
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 < 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)

isCompatible

public boolean isCompatible(int granted)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).