IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid
Class LockStrategy

java.lang.Object
  extended by com.ibm.websphere.objectgrid.LockStrategy

public final class LockStrategy
extends Object

LockStrategy provides an enumerated type idiom for use on the BackingMap.setLockStrategy(LockStrategy) method. It determines whether or not a lock manager is needed for a BackingMap and if so, whether to use a optimistic or pessimistic locking strategy.

Since:
WAS XD 6.0, XC10
See Also:
BackingMap.setLockStrategy(LockStrategy)

Field Summary
static LockStrategy NONE
          NONE indicates internal LockManager use is not needed since concurrency control is provided outside of ObjectGrid either by a persistence manager using objectgrid as a side cache, the application, or by a Loader plugin (for example, uses database locks to control concurrency).
static LockStrategy OPTIMISTIC
          OPTIMISTIC is typically used for a map that does not have a Loader plugin, the map is read mostly, and locking is neither provided by a persistence manager using ObjectGrid as a side cache or by the application itself.
static LockStrategy PESSIMISTIC
          PESSIMISTIC is typically used for a map that does not have a Loader plugin and locking is neither provided by a persistence manager using ObjectGrid as a side cache, by a Loader plugin, or by the application itself.
 
Method Summary
 String toString()
          Returns a string representation of the LockStrategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final LockStrategy NONE
NONE indicates internal LockManager use is not needed since concurrency control is provided outside of ObjectGrid either by a persistence manager using objectgrid as a side cache, the application, or by a Loader plugin (for example, uses database locks to control concurrency).


OPTIMISTIC

public static final LockStrategy OPTIMISTIC
OPTIMISTIC is typically used for a map that does not have a Loader plugin, the map is read mostly, and locking is neither provided by a persistence manager using ObjectGrid as a side cache or by the application itself. For this strategy, an exclusive lock is obtained on a map entry being inserted, updated, or removed at commit time. The lock ensures version information cannot be changed by another transaction while the transaction being committed is performing an optimistic version check.


PESSIMISTIC

public static final LockStrategy PESSIMISTIC
PESSIMISTIC is typically used for a map that does not have a Loader plugin and locking is neither provided by a persistence manager using ObjectGrid as a side cache, by a Loader plugin, or by the application itself. It is typically used when optimistic approach fails too often since there are update transactions that frequently collide on the same map entry (e.g. not a read mostly map or large number of clients accessing a small map).

Method Detail

toString

public String toString()
Returns a string representation of the LockStrategy.

Overrides:
toString in class Object
Returns:
a string representation of the LockStrategy.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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