[Java programming language only]

Caching objects with no relationships involved (ObjectMap API)

ObjectMaps are like Java™ Maps that allow data to be stored as key-value pairs. ObjectMaps provide a simple and intuitive approach for the application to store data. An ObjectMap is ideal for caching objects that have no relationships involved.

Use the EntityManager API for caching objects that have relationships. For more information about the EntityManager API, see Caching objects and their relationships (EntityManager API).

Applications typically obtain a WebSphere eXtreme Scale reference and then obtain a Session object from the reference for each thread. Sessions cannot be shared between threads. The getMap method of Session returns a reference to an ObjectMap to use for this thread.