IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1

com.ibm.websphere.objectgrid
LockStrategy

java.lang.Object
  |
  +--com.ibm.websphere.objectgrid.LockStrategy


LockStrategy provides 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.

Field Summary
public  LockStrategyNONE
           NONE indicates internal LockManager use is not needed since concurrency control is provided outside of objectgrid (either by persistence manager using objectgrid as a side cache, application, or by Loader plugin (e.
public  LockStrategyOPTIMISTIC
           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 persistence manager using objectgrid as a side cache or by the application itself.
public  LockStrategyPESSIMISTIC
           PESSIMISTIC is typically used for a map that does not have a Loader plugin and locking is neither provided by persistence manager using objectgrid as a side cache, by a Loader plugin, or by the application itself.

Method Summary
public  StringtoString()
           Returns a string representation of the LockStrategy.

Inherited Methods

Methods inherited from java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

NONE

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

OPTIMISTIC

public 
  static 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 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 versioning check.

PESSIMISTIC

public 
  static PESSIMISTIC
PESSIMISTIC is typically used for a map that does not have a Loader plugin and locking is neither provided by persistence manager using objectgrid as a side cache, by a Loader plugin, or by the application itself. 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.


Returns:
     a string representation of the LockStrategy.


IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1