IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid
Enum LockMode

java.lang.Object
  extended by java.lang.Enum<LockMode>
      extended by com.ibm.websphere.objectgrid.LockMode
All Implemented Interfaces:
Serializable, Comparable<LockMode>

public enum LockMode
extends Enum<LockMode>

Specifies which lock mode to use to lock a key.

Since:
8.6
See Also:
ObjectMap.lock(Object, LockMode), ObjectMap.lockAll(java.util.List, LockMode)

Enum Constant Summary
EXCLUSIVE
          Exclusive lock that can only be obtained if no one else is currently hold a lock.
SHARED
          Shared lock that can be obtained if no one is currently holding an exclusive lock.
UPGRADABLE
          Upgradable lock that can be obtained if no one is currently holding an upgradable or exclusive lock.
 
Method Summary
static LockMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LockMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SHARED

public static final LockMode SHARED
Shared lock that can be obtained if no one is currently holding an exclusive lock.


UPGRADABLE

public static final LockMode UPGRADABLE
Upgradable lock that can be obtained if no one is currently holding an upgradable or exclusive lock.


EXCLUSIVE

public static final LockMode EXCLUSIVE
Exclusive lock that can only be obtained if no one else is currently hold a lock.

Method Detail

values

public static LockMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LockMode c : LockMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LockMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.