Configuring a time to live (TTL) evictor

When you create a simple grid, a default (static) map and a set of dynamic maps are created. By default, there is no time to live evictor configured for a default map. If you have a dynamic map then you can set a TTL value for creation time (.*CT), last update time (*.LUT), or last access time (*.LAT). You can change this default behavior so that a TTL evictor is also enabled for a default map.

Before you begin

Procedure

  1. In the user interface, click Data Grid > Simple Data Grid > data_grid_name > Show advanced attributes.
  2. In the Evictor for map named list box, select an evictor type. If you decide to keep this option to NONE, then the time to live evictor is disabled only for a default map. Otherwise, selecting an evictor type to other than NONE enables TTL for a default map.
  3. Specify a value in the Evict data from time to live maps after box. The default TTL value is 3600 seconds. The value you specify here also applies to a default map if the evictor type is set to other than NONE. A value of 0 turns off TTL eviction for the entire grid.
  4. Click Apply Changes to save. You are warned about data loss once the grid restarts.

Example

Default scenario:

In this scenario, the selected evictor type in the Evictor for map named list box is NONE and the specified TTL value in the Evict data from time to live maps after field is 3600. As a result, entries are evicted after 1 hour only for dynamic maps ending in *.CT, *.LUT, and *.LAT.

Customizing the default evictor type to other than NONE scenario:

In this scenario, the selected evictor type in the Evictor for map named list box is Creation Time and the specified TTL value in the Evict data from time to live maps after field is 3600. As a result, entries are evicted after 1 hour for dynamic maps ending in *.CT, *.LUT, and *.LAT. The default map evicts entries 1 hour after the creation time.

Customizing the default evictor type and the TTL value scenario:

In this scenario, the selected evictor type in the Evictor for map named list box is Last updated time and the specified TTL value in the Evict data from time to live maps after field is 4800. As a result, entries are evicted after 80 minutes for dynamic maps ending in *.CT, *.LUT, and *.LAT. The default map evicts entries 80 minutes after the last time the entry was updated.

Customizing the TTL value only scenario:

In this scenario, the selected evictor type in the Evictor for map named list box is NONE and the specified TTL value in the Evict data from time to live maps after field is 0. As a result, TTL eviction is turned off for all maps (both default and dynamic) for this grid.

Customizing the default evictor type and the TTL value scenario:

In this scenario, the selected evictor type in the Evictor for map named list box is Last access time and the specified TTL value in the Evict data from time to live maps after field is 0. As a result, TTL eviction is turned off for both all maps (both default and dynamic) for this grid.