The main interface used by clients of index wrappers that are not Name Spaced.
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(key) and to remove use remove(key).
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 a cache is to create a com.jofti.manager.IndexManager then use the
getIndexCache method to obtain a reference to the index. Where a listener implementation is available it is
recommended to configure a listener adapter and perform the puts/gets directly on the cache implementation. This Inteface should be used
where you want to be able to swap cache implmentations with no code change or you need to use a cache, such as Map, that has no callback capability.
author: Steve Woodcock (steve@jofti.com)
version: 1.3
|