| java.lang.Object com.jofti.cache.BaseAdaptor com.jofti.cache.adapter.MockAdapter
MockAdapter | public class MockAdapter extends BaseAdaptor implements CacheAdapter(Code) | | The adapter implementation specific to the Map interface.
The adapter takes care of the implementation specific details for converting
between the process the index expects and the behaviour of the Map.
Although it is possible to use this adapter with any Map implementation, it
does not deal with the LinkedHashMap where it has been configured to run as
an LRU cache. As values will dispear from the Map without callback to the index. This also applies to other Map
type structures that silently expire elements.
Care must be taken when using Maps with similar expiry functionality as it will lead to memory leaks.
The start up of the adapter will also try and index any elements already in
the Map.
author: Steve Woodcock author: version: 1.0 version:
|
MockAdapter | public MockAdapter()(Code) | | |
remove | public void remove(Object key) throws JoftiException(Code) | | Removes the element which matches the key.
If no element matches, nothing is removed and no Exception is thrown.
Parameters: key - the key of the element to remove throws: CacheException - |
removeAll | public void removeAll() throws JoftiException(Code) | | Remove all elements in the cache, but leave the cache in a useable state.
throws: CacheException - |
|
|