Product overview > Cache > Caching architecture


Maps


Overview

A map is a container for key-value pairs, which allows an application to store a value indexed by a key. Maps support indexes that can be added to index attributes on the key or value. These indexes are automatically used by the query runtime to determine the most efficient way to run a query.


Map sets

A map set is a collection of maps with a common partitioning algorithm. The data within the maps are replicated based on the policy defined on the map set. A map set is only used for distributed topologies and is not needed for local topologies.

A map set can have a schema associated with it. A schema is the metadata that describes the relationships between each map when using homogeneous Object types or entities.

WXS can store serializable Java objects in each of the maps using the ObjectMap API. A schema can be defined over the maps to identify the relationship between the objects in the maps where each map holds objects of a single type. Defining a schema for maps is required to query the contents of the map objects. WXS can have multiple map schemas defined.

WXS can also store entities using the EntityManager API.EntityManager API. Each entity is associated with a map. The schema for an entity map set is automatically discovered using either an entity descriptor XML file or annotated Java classes. Each entity has a set of key attributes and set of non-key attributes. An entity can also have relationships to other entities. WXS supports one to one, one to many, many to one and many to many relationships. Each entity is physically mapped to a single map in the map set. Entities allow applications to have complex object graphs that span multiple Maps. A distributed topology can have multiple entity schemas.


Parent topic:

Cache architecture: Maps, containers, clients, and catalogs


Related concepts

Container servers, partitions, and shards
Clients
Catalog service
Cache topology: In-memory and distributed caching
Java object caching concepts
Interacting with an ObjectGrid using the ObjectGridManager
Cache objects with no relationships involved (ObjectMap API)
Cache objects and their relationships (EntityManager API)


Related tasks

Connect to a distributed ObjectGrid
Configure grids
ObjectQuery tutorial
Configure entities