Declare a new In-Memory Store

Define configuration for one or more In-Memory Stores in a cache configuration file for BigMemory (an ehcache.xml file).

It is a best practice to change the default file name ehcache.xml for this configuration file to something more meaningful, such as myCRM-cache.xml. This makes it easier to identify when multiple configuration files are uploaded to MashZone NextGen.

Procedure

  1. Add a name attribute to the <ehcache> element and assign a unique name.

    This is the cache manager name which must be unique for this MashZone NextGen Server. It should consist solely of letters, numbers, underscores(_) or dashes (-).

  2. Add a <cache> element for each store you need to declare. The following example shows some common properties. See BigMemory documentation for more information.

    You can find this example configuration file, sample-cache.xml, for declared stores in the <MashZone NextGen installation> /prestocli/raql-samples folder.

    <ehcache name="sample-cache" > <diskStore path="java.io.tmpdir"/> ... <cache name="StocksDeclCache" maxBytesLocalHeap="50M" memoryStoreEvictionPolicy="LRU" timeToIdleSeconds="0" timeToLiveSeconds="0"> </cache> ... </ehcache>

    If this In-Memory Store will be populated by external systems with datasets that are Java objects, add <searchable> to the <cache> element and define a <searchAttribute> with the name, datatype and extractor class for each property in these Java objects that will contain data.

    For the class attribute, use the net.sf.ehcache.search.AttributeExtractor interface provided in the BigMemory Search API or an implementation class of AttributeExtractor. See BigMemory documentation for details.

    MashZone NextGen is only able to access searchable attributes of datasets stored by external systems. For Apama used as external system, search attributes are no more required.

    Since version 9.9 MashZone NextGen supports the native Apama RowValue format. MashZone NextGen can consume RowValues stored by Apama and convert them into the RAQL record format. In case of caches written by Apama searchable attributes are no more needed for accessing the data at all but they are still required for processing filters, aggregations and sorting directly in BigMemory.

  3. Save this file.
  4. Copy the JAR file containing the classes used as search attributes to extract data from the dataset in this cache to MashZoneNG-config/lib.

    See documentation for the external system that created this dynamic store to determine what JAR files are needed. For Apama, see documentation on the MemoryStore.

    The default location for this folder in MashZone NextGen is <MashZone NextGen> installation/apache-tomcat/mashzone/WEB-INF/lib. If MashZone NextGen is deployed in a cluster, however, this location may be a separate external folder. For more information, see Setting Up an External MashZone NextGen Configuration Folder.

  5. Restart the MashZone NextGen Server. For instructions, see Start and Stop the MashZone NextGen Server.
  6. Open the MashZone NextGen Admin Console.
  7. Click Server to expand this section of the Administration menu.
  8. Click BigMemory.
  9. Open the BigMemory Cache tap.

    The Big Memory Cache tab lists any In-Memory Store configuration files that have already been upload.

  10. Click Register a new EhCache Configuration File.
  11. Enter the name assigned to <ehcache> in this configuration file (in step 1) as the Big Memory Data Source Name. This name is used as a prefix for all stores defined in this configuration file to uniquely identify each store.

    Data source names must be unique for this MashZone NextGen Server. They should contain only letters, numbers, underscores (_) or dashes (-).

    If any of the declared In-Memory Stores for this connection have data populated by external systems, the data source name must also match the name assigned to the <ehcache> element in the configuration file.

  12. Click Browse to find and select the Cache Configuration File ehcache.xml you created in step 1.
  13. Click Add this file.

The file is uploaded to the MashZone NextGen Repository in the standard path bigmemory/caches/file-name and shown in the list by data source name. The URL shown is the relative path in MashZone NextGen to this resource.

Administrators can also manage resources files in the Admin Console. See Manage Files for MashZone NextGen Features or Artifacts for more information.