[.net programming language only]

Creating dynamic maps with .NET APIs

[Version 8.6.0.2 and later]You can create dynamic maps with .NET APIs after the data grid has been instantiated. You can dynamically instantiate maps that are based on a set of map templates. You can create your own map templates.

Before you begin

Configure a dynamic map template. For more information, see Configuring dynamic maps.

Procedure

Call the GetGridMapPessimisticTx method.

If you pass in a String that matches the regular expresssion of a template map that you created in the ObjectGrid XML file, an ObjectMap based on the BackingMap that was configured by the ObjectGrid XML file is created. The following example matches the templateMap.* template name that is defined in the ObjectGrid XML file:

IGridManager gm = GridManagerFactory.GetGridManager( );
ICatalogDomainInfo cdi = 
	gm.CatalogDomainManager.CreateCatalogDomainInfo( catalogServerHostsList );
IClientConnectionContext ccc = gm.Connect( cdi, "SimpleClient.properties" );
grid = gm.GetGrid( ccc, "Grid" );
IGridMapPessimisticTx<Object, Object> map = 
	grid.GetGridMapPessimisticTx<Object, Object>( "SessionState.LAT.P" );
The SessionState.LAT.P map is a map that uses last access time eviction, pessimistic locking and no near-cache invalidation.