|
Summary: All the persistency options in the persistent space schema file.
OverviewThe Persistent space options described as part of the space schema file: <space-config> <persistent> <enabled>true</enabled> <!-- name of the storage adapter class to be used by the space - by default, it is com.j_spaces.sadapter.GenericPA.GenericPersistentAdapter --> <StorageAdapterClass>com.j_spaces.sadapter.GenericPA.GenericPersistentAdapter </StorageAdapterClass> <AdapterType>com.j_spaces.sadapter.GenericPA.PerstPersistentAdapter</AdapterType> <CacheLoaderClass></CacheLoaderClass> <entity-class></entity-class> <DataBaseName>${com.gs.home}/GenericPersistProperties/${com.gs.container.name}_${com.gs.space.name}/ ${com.gs.container.name} _${com.gs.space.name}DB.dbs</DataBaseName> <userName></userName> <password></password> <Number_Sync_Objects>-1</Number_Sync_Objects> <Check_Point_Period>-1</Check_Point_Period> <Page_Pool_Size>32768</Page_Pool_Size> <Sync_On_Commit>true</Sync_On_Commit> <!-- path to the directory that holds the database properties and data type mapping e.g ${com.gs.home}/GenericPersistProperties --> <StorageAdapterURL>${com.gs.home}/GenericPersistProperties</StorageAdapterURL> <!-- if true persistent space will be forced to start in COLD_INIT(empty) otherwise WARM_INIT --> <force-cold-init>false</force-cold-init> </persistent> <!--RDBMS configuration--> <init_sa_connections>10</init_sa_connections> <max_sa_connections>100</max_sa_connections> <!--if true all data will be lost, if WARM INIT FAILED--> <sa_reset_on_failure>false</sa_reset_on_failure> </space-config>
Defining Cache SizeWhen a persistent space (using the JDBC SA or an indexed file) is using LRU cache policy and the space has been restarted, it loads data from the underlying durable data source (RDBMS, indexed file) 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%): XML schema tag: <space-config> <engine> <initial_load>5</initial_load> </space-config> </engine> XPATH property: space-config.engine.initial_load=5
The <initial_load_class> tag can also be added to the space schema. This tag specifies which class to load. For example: <space-config> <engine> <initial_load_class>com.myCompany.myEntry</initial_load_class> </space-config> </engine> Setting <initial_load_class>_</initial_load_class> is the same as not having this element in the schema. |
Wiki Content Tree
Your Feedback Needed!
We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.
Add Comment