IGridMapPessimisticAutoTx TKey, TValue  InterfaceIBM WebSphere™ eXtreme Scale Client for .NET API Specification
IBM WebSphere™ eXtreme Scale Client for .NET Release 8.6.0.0 API Specification

This is a handle to a map using automatic transaction demarcation.

An instance of this IGridMapPessimisticAutoTx can only be used by the thread at a time. Use the Dispose  method when finished with the map, to improve performance.

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

Type Parameters

TKey
Generic type key.
TValue
Generic type value.
Remarks

Each data access method includes a "Specification details" table that includes the following information:

Required permission:The permission required to use the API.
Pessimistic read lock acquired:The type of lock that is acquired when using pessimistic locking with repeatable read transaction isolation.
Cache tier:Identifies the map cache tiers that are included when fetching or updating cache entries in the call and under what circumstances. The following tiers are available for IGridMapPessimisticAutoTx maps:
  • Server Cache (data grid)
  • Loader (if enabled)

Examples

This sample demonstrates how to put a new cache entry into the data grid:
// Assume we have already connected to the Grid...
IGrid grid = ...

// Retrieve a new map instance.
IGridMapPessimisticAutoTx<long, string> map = grid.GetGridMapPessimisticAutoTx<long, string>("MyPessimisticMap");

try
{
    // Put the entry in the cache.
    map.Put(123, "Value to cache");
}
catch(GridException)
{
    // Handle any concequences of failed put.
}

// Dispose the map (optional, but it improves performance)
map.Dispose();
See Also