You can create additional maps in a
data grid by having your client application connect to the specially-named
map. When this connection occurs, the map is automatically created.
Dynamic map naming
When you create a data grid, two
maps created by default. The first map is named the same as your data
grid. For example, if you create the myGrid data grid, you automatically get a myGrid map. The second map is for the near cache and is named myGrid.NCI. However, you can also add maps to the
data grid. A map is automatically created when the client application
connects to a map using the following naming convention:
<map_name>.<template>.<locking_option> .<near_cache_invalidation>
where:
- map_name (required)
- Specifies the name of the map.
- template (required)
- Specifies the template that defines when entries expire from the
map, by defining the time to live (TTL) behavior. See Map templates for a list of the available options.
- locking_option
- Specifies the locking mechanism that is used for the map. See Locking options for a list of the available options.
- near_cache_invalidation
- Specifies if near-cache invalidation is used for the map. Near-cache
invalidation is only used when the map has a lock type set to NONE or OPTIMISTIC. You can configure
near cache invalidation to remove stale data from the near cache as
quickly as possible. When an update, deletion, or invalidation operation
is run against the remote data grid, an asynchronous invalidation
gets triggered in the near cache See Near-cache invalidation options for a list of the available options.
You must include a template name for the map. If you
do not specify a locking option, no locking occurs on the map.
Map templates
Table 1. Dynamic map templatesMap Template |
Description |
*.NONE |
Specifies a map with no time to live (TTL) expiration. |
*.LUT |
Specifies a map in which the entries are expired
based on the last update time of the entry. The default TTL is one
hour. |
*.LAT |
A map in which the entries are expired based
on the last access time of the entry. The default TTL is one hour. |
*.CT |
A map in which the entries are expired based
on the of the creation time of the entry plus the TTL value. The default
TTL is one hour. |
Locking options
Table 2. Dynamic map locking optionsLocking Option |
Description |
(blank) |
If you do not indicate a locking option, no
locking mechanism is used. |
.P |
Specifies that the map has pessimistic locking |
.O |
Specifies that the map has optimistic locking |
Near-cache invalidation
options
Table 3. Near-cache invalidation optionsLocking Option |
Description |
(blank) |
If you do not indicate a value, near-cache invalidation
is disabled. |
.NCI |
Specifies that the map uses near-cache invalidation.
Your map must have optimistic or no locking enabled. |