Clustered (JGroups and JMS)
The cluster wrapper distributes calls to clear() and remove() to a equivalent
(having the same name) cache's in a cluster. This helps nodes of a cluster
to prevent stale data from being returned from a cache. The idea is -
that when one cache updates an object, it will explicitly call clear on
the cache to remove the old version.
This wrapper does not keep the content of a cache in sync. Adds and gets are not
distributed - cache's are NOT replicated.
This wrapper uses JGroups or JMS to distribute messages to nodes of the cluster.
If you want to use JMS, you should read this Clustering with JMS
Miss Handler
The usage pattern for a cache is very simple and consistent.
When using a cache, an application will typically check the cache before it
performs an expensive operation to obtain an object. The goal of course is to
avoid spending time and resources obtaining a unchanging result multiple times.
Now that you know what a cache is :) - the Miss Handler Cache helps to implement this
usage pattern. To use it, you must implement the MissHandler interface. When this
wrapper cache is asked for an object it doesn't have, it redirects that request to the
your MissHandler.
The miss handler performs key level locking to ensure that two threads requesting
the same key at approximately the same time will not initiate two requests to the
MissHandler.