OptimisticCollisionException ClassIBM WebSphere™ eXtreme Scale Client for .NET API Specification
IBM WebSphere™ eXtreme Scale Client for .NET Release 8.6.0.0 API Specification

An OptimisticCollisionException occurs when an optimistic locking strategy is used and more than one update transaction collides on the same map entry of an ObjectGrid instance. The first transaction to commit updates the version object for the map entry. Other transactions that read this same map entry before committing have the previous version object. When the other transactions try to commit, the version object that is read does not match the version that was last committed. Therefore, other transactions are prevented from updating a map entry with stale data.

The default OptimisticCallback plug-in is used by the run time if an implementation is not provided by the application. If a well-constructed equals(Object) method is not on your value object, this exception occurs because the entire value object is used as the version object.

Because this exception indicates that the map entry contains stale data, stale map entries or entries as identified by the key parameter that is passed to the OptimisticCollisionException(String, String, String, Object) method are invalidated. If this exception is thrown by a Loader plug-in and a null reference is used as the key parameter by the loader, the run time assumes that the loader does not know which entry caused the exception. In this scenario, the LogSequence object is passed to the Loader.batchUpdate(TxID, LogSequence) method to determine which map entries to invalidate. Each LogElement entry in the LogSequence object that is type update or delete is invalidated.

Inheritance Hierarchy

System Object
  System Exception
    IBM.WebSphere.Caching GridException
      IBM.WebSphere.Caching.Map OptimisticCollisionException

Namespace: IBM.WebSphere.Caching.Map
Assembly: Client.Api (in Client.Api.dll) Version: 8.6.0.0
Syntax

See Also