Program guide > Access data with client applications
Cache 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. If object relationships are involved, then you should use the EntityManager API.
For more information about the EntityManager API, see Cache 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.
- Introduction to ObjectMap
The ObjectMap interface is used for transactional interaction between applications and BackingMaps.
- Dynamic maps
With the dynamic maps feature you can create maps after the grid has already been initialized.
- ObjectMap and JavaMap
A JavaMap instance is obtained from an ObjectMap object. The JavaMap interface has the same method signatures as ObjectMap, but with different exception handling. JavaMap extends the java.util.Map interface, so all exceptions are instances of the java.lang.RuntimeException class. Because JavaMap extends the java.util.Map interface, it is easy to quickly use WebSphere eXtreme Scale with an existing application that uses a java.util.Map interface for object caching.
- Maps as FIFO queues
With WebSphere eXtreme Scale, you can provide a first-in first-out (FIFO) queue-like capability for all maps. WebSphere eXtreme Scale tracks the insertion order for all maps. A client can ask a map for the next unlocked entry in a map in the order of insertion and lock the entry. This process allows multiple clients to consume entries from the map efficiently.
Parent topic:
Access data with client applications
Related concepts
Interacting with an ObjectGrid using ObjectGridManager
Data access with indexes (Index API)
Access data in WebSphere eXtreme Scale
Use Sessions to access data in the grid
Cache objects and their relationships (EntityManager API)
Retrive entities and objects (Query API)
Configure clients with WebSphere eXtreme Scale
Related tasks
Related reference
Connect to a distributed ObjectGrid