The main interface used by clients of caches that are Name Spaced
indexes.
The interface uses similar methods to the Map interface as most cache implementations
can be easily adapted to these methods.
As with the Map classes the metaphors are to add an object use the put method, to retrieve an
object use get(nameSpace,key) and to remove use remove(nameSpace,key).
The additional parameter on all these methods is a nameSpace object. The format of this object
will depend on the cache implementation used. For JBossCache, for instance, the name Space is
of type org.jboss.cache.Fqn.
The additional query method is for clients to query the cache by values other than the key. Please refer to
the docs on IndexQuery.
It is important to realise that although the interface takes an Object as both key and value, some caches will only
allow certain types of Objects to be inserted. Check with the actual cache provider used to determine
these limitations.
The usage to obtain an indexed cache is to create a com.jofti.manager.IndexManager then use the
getNameSpacedIndex method to obtain a reference to the indexed cache. You cannot retrieve a nameSpaced indexed cache using the
getIndex method.
author: Steve Woodcock
version: 1.4
|