versioned-near-scheme

versioned-near-scheme

Used in: caching-schemes.

As of Coherence release 2.3, it is suggested that a near-scheme be used instead of versioned-near-scheme. Legacy Coherence applications use versioned-near-scheme to ensure coherence through object versioning. As of Coherence 2.3 the near-scheme includes a better alternative, in the form of reliable and efficient front cache invalidation.

Description

As with the near-scheme, the versioned-near-scheme defines a two tier cache consisting of a small and fast front-end, and higher-capacity but slower back-end cache. The front-end and back-end are expressed as normal cache-schemes. A typical deployment might use a local-scheme for the front-end, and a distributed-scheme for the back-end. See the services overview for a more detailed description of versioned near caches.

Implementation

The versioned near scheme is implemented by the com.tangosol.net.cache.VersionedNearCache class.

Versioning

Object versioning is used to ensure coherence between the front and back tiers.

Elements

The following table describes the elements you can define within the near-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 versioned near cache.

Any custom implementation must extend the com.tangosol.net.cache.VersionedNearCache class and declare the exact same set of public constructors.
<init-params> Optional Specifies initialization parameters, for use in custom versioned near 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.
<front-scheme> Required Specifies the cache-scheme to use in creating the front-tier cache.

Legal values are:

For Example:

<front-scheme>
  <local-scheme>
    <scheme-ref>default-eviction</scheme-ref>
  </local-scheme>
</front-scheme>

or

<front-scheme>
  <class-scheme>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    <init-params></init-params>
  </class-scheme>
</front-scheme>
<back-scheme> Required Specifies the cache-scheme to use in creating the back-tier cache.

Legal values are:


For Example:

<back-scheme>
  <distributed-scheme>
    <scheme-ref>default-distributed</scheme-ref>
  </distributed-scheme>
</back-scheme>

<version-transient-scheme> Optional Specifies a scheme for versioning cache entries, which ensures coherence between the front and back tiers.
<autostart> Optional The autostart element is intended to be used by cache servers (i.e. com.tangosol.net.DefaultCacheServer). It specifies whether or not the cache services associated with this cache scheme should be automatically started at a cluster node.

Legal values are true or false.

Default value is false.