external-scheme

external-scheme

Used in: caching-schemes, distributed-scheme, replicated-scheme, optimistic-scheme, near-scheme, versioned-near-scheme, overflow-scheme, read-write-backing-map-scheme, versioned-backing-map-scheme

Description

External schemes define caches which are not JVM heap based, allowing for greater storage capacity.

Implementaion

This scheme is implemented by:

The implementation type is chosen based on the following rule:

Pluggable Storage Manager

External schemes use a pluggable store manager to store and retrieve binary key value pairs. Supported store managers include:

Size Limited Cache

The cache may be configured as size-limited, which means that once it reaches its maximum allowable size it prunes itself.

Eviction against disk based caches can be expensive, consider using a paged-external-scheme for such cases.

Persistence (long-term storage)

External caches are generally used for temporary storage of large data sets, for example as the back-tier of an overflow-scheme. Certain implementations do however support persistence for non-clustered caches, see the bdb-store-manager and lh-file-manager for details. Clustered persistence should be configured via a read-write-backing-map-scheme on a distributed-scheme.

Elements

The following table describes the elements you can define within the external-scheme element.

Element Required/Optional Description
<scheme-name> Optional Specifies the scheme's name. The name must be unique within a configuration file.
<scheme-ref> Optional Specifies the name of another scheme to inherit from.
<class-name> Optional Specifies a custom implementation of the external cache.

Any custom implementation must extend either:

and declare the exact same set of public constructors as the superclass.

<init-params> Optional Specifies initialization parameters, for use in custom external cache implementations which implement the com.tangosol.run.xml.XmlConfigurable interface.
<listener> Optional Specifies an implementation of a com.tangosol.util.MapListener which will be notified of events occurring on the cache.
<high-units> Optional Used to limit the size of the cache. Contains the maximum number of units that can be placed in the cache before pruning occurs. An entry is the unit of measurement. Once this limit is exceeded, the cache will begin the pruning process, evicting the least recently used entries until the number of units is brought below this limit. The scheme's class-name element may be used to provide custom extensions to SerializationCache, which implement alternative eviction policies.

Legal values are positive integers or zero. Zero implies no limit.

Default value is zero.
<async-store-manager> Optional Configures the external cache to use an asynchronous storage manager wrapper for any other storage manager.
<custom-store-manager> Optional Configures the external cache to use a custom storage manager implementation.
<bdb-store-manager> Optional Configures the external cache to use Berkeley Database JE on-disk databases for cache storage.
<lh-file-manager> Optional Configures the external cache to use a Tangosol LH on-disk database for cache storage.
<nio-file-manager> Optional Configures the external cache to use a memory-mapped file for cache storage.
<nio-memory-manager> Optional Configures the external cache to use an off JVM heap, memory region for cache storage.