org.exolab.core.foundation
Class LockType

java.lang.Object
  extended byorg.exolab.core.foundation.LockType
All Implemented Interfaces:
java.io.Serializable

public final class LockType
extends java.lang.Object
implements java.io.Serializable

This class defines an enumeration for lock types.. READ a read lock can be shared with other readers WRITE a write lock can not be shared with other readers and writers

Version:
$Revision: 1.1 $ $Date: 2000/02/22 07:37:55 $
Author:
Jim Alateras
See Also:
Serialized Form

Field Summary
static LockType READ
          Instatiate instances related to each of the enumerations
static LockType WRITE
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Return true iff the two specified object are of the same type and their ordinal values are identical.
 int getOrd()
          Returns the ordinal value for this state
 boolean isReadLock()
          Test if this is a read lock,
 boolean isWriteLock()
          Test if this is a write lock.
static int size()
          Returns the number of states in this enumeration
 java.lang.String toString()
          Returns the name of this lock type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ

public static final LockType READ
Instatiate instances related to each of the enumerations


WRITE

public static final LockType WRITE
Method Detail

getOrd

public int getOrd()
Returns the ordinal value for this state

Returns:
int

toString

public java.lang.String toString()
Returns the name of this lock type

Returns:
String

size

public static int size()
Returns the number of states in this enumeration

Returns:
int

equals

public boolean equals(java.lang.Object obj)
Return true iff the two specified object are of the same type and their ordinal values are identical.

Parameters:
obj - object to compare against
Returns:
boolean true if objects are equivalent

isReadLock

public boolean isReadLock()
Test if this is a read lock,

Returns:
boolean true if it is a read lock.

isWriteLock

public boolean isWriteLock()
Test if this is a write lock.

Returns:
boolean true if it is a write lock.


Copyright © 1999-2005 The Exolab Group. All Rights Reserved.