Summary: A configuration schema that defines how a space should persist its in-memory data to disk-based storage (either RDBMS when using the JDBC SA).

Overview

The persistent space running with the JDBC SA options described below:

property Description Default Value
space-config.
persistent.enabled
Boolean value. If set to true, moves the space into persistent mode allowing it to persist data into a file or database or use the ExternalDataSource interface.  
space-config.
persistent.
StorageAdapterClass
Adapter implementation. Can have the following options:
  • JDBC SA - com.j_spaces.sadapter.
    GenericJDBC.JDBCStorageAdapter- using RDBMS for persistency.
  • External Data Source – com.j_spaces.sadapter
    .datasource.DataAdapterExternalDataSource implementation.
com.j_spaces.sadapter.
GenericJDBC.JDBCStorageAdapter
space-config.
persistent.
StorageAdapterURL
The location of the JDBC SA properties files or the Generic SA files that stores the space data. Example:
<StorageAdapterURL>
/GenericJDBCProperties/
H2Properties</StorageAdapterURL>
When using the JDBC SA, the path that is defined as part of the <StorageAdapterURL> property should be part of the JVM classpath running the space.
 
space-config.
persistent.
force-cold-init
Clears the space data stored at persistent data source when the space is started. false
space-config.
init_sa_
connections
Relevant only for the JDBC SA. Connection pool maximum size. 10
space-config.
max_sa_
connections
Relevant only for the JDBC SA. Connection pool minimum size. 100
space-config.
sa_reset_
on_failure
Clears the persistent data source if it identifies problems with database tables. false

Defining Cache Size

When a persistent space (using the JDBC SA) is using LRU cache policy and the space has been restarted, it loads data from the underlying durable data source (RDBMS) before being available for clients to access.

The default behavior is to load data up to 50% of the <cache_size> value.

When the <memory_usage> is true (evicting data from the space based on free heap size), is it recommended to have a large value for the <cache_size> property. This instructs the space engine to ignore the amount of Entries inside the space when launching the eviction mechanism. This ensures that the eviction is based only on heap size free memory.

The combination of the above (large <cache_size> and space restart) may lead to out of memory problems. To avoid this, configure the space-config.engine.initial_load to have a low value (5 below means 5% of the <cache_size> – default is 50%):

XPATH property:

space-config.engine.initial_load=5

The <initial_load_class> property specifies which class to load. For example:

space-config.engine.initial_load_class=com.myCompany.myEntry
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence