com.bankframe.services.cache
Interface Cache

All Superinterfaces:
java.util.Map
All Known Subinterfaces:
PersistentCache
All Known Implementing Classes:
GenericCache, NullCache

public interface Cache
extends java.util.Map

This interface defines the the caching in MCA services


Method Summary
 void addCacheListener(java.lang.Object key, CacheListener listener)
          Adds a CacheListener for a specified key.
 void cleanup()
          This method cleans up the cache by removing un-needed entries
 void enableCaching(boolean enableCache)
          This method enables or disables caching.
 CachePolicy getCachePolicy()
          This method gets the CachePolicy object for this Cache
 void remove(java.util.Set keySet)
          This method removes the specified keys from the cache and the data store
 void removeAll()
          Removes all objects from the cache and from the data store.
 void removeCacheListener(java.lang.Object key, CacheListener listener)
          Removes a CacheListener for a specified key.
 void setCachePolicy(CachePolicy policy)
          This method sets the CachePolicy object for this Cache
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

cleanup

public void cleanup()
This method cleans up the cache by removing un-needed entries


enableCaching

public void enableCaching(boolean enableCache)
This method enables or disables caching. When caching is disabled the cache passes all operations on to the persistent map instance

Parameters:
enableCache - true to enable, false to disable

getCachePolicy

public CachePolicy getCachePolicy()
This method gets the CachePolicy object for this Cache

Returns:
CachePolicy instance or null if there is no CachePolicy

remove

public void remove(java.util.Set keySet)
This method removes the specified keys from the cache and the data store

Parameters:
keySet - the keys to remove from the cache

removeAll

public void removeAll()
Removes all objects from the cache and from the data store. Use this method with caution!


setCachePolicy

public void setCachePolicy(CachePolicy policy)
This method sets the CachePolicy object for this Cache

Parameters:
policy - The new cache policy

addCacheListener

public void addCacheListener(java.lang.Object key,
                             CacheListener listener)
Adds a CacheListener for a specified key. Listeners will be notified of actions on the cache for that key only.


removeCacheListener

public void removeCacheListener(java.lang.Object key,
                                CacheListener listener)
Removes a CacheListener for a specified key.



Copyright © 2005 Siebel Systems, Inc. All rights reserved.