Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiSrvLifetimeCacheHolder

All Superinterfaces:
EbiCacheHolder, Serializable

public interface EbiSrvLifetimeCacheHolder
extends EbiCacheHolder

This is an interface for a cache holder which provides a method for the cache manager to notify when a cache entry is removed.


Method Summary
 String getIdentifier()
          Gets identifier
 void putObjectInCache(Object key, Object obj, int state)
          Stores an object into the cache managed by the object cache container of the cache manager.
 void putObjectInCache(String componentKey, String contentKey, Object obj, int state)
          Stores an object into the cache managed by the object cache container of the cache manager.
 void putObjectInCache(String objectType, String componentKey, String contentKey, Object obj, int state)
          Stores an object into the cache managed by the object cache container of the cache manager.
 void putValueInCache(Object key, byte[] data, int state, boolean useDisk)
          Stores a value in the cache, with the option to specify whether to use disk caching (when it becomes necessary) and with the option to provide state information to allow triggering of cache invalidation.
 void putValueInCache(Object key, int contentType, long contentSize, InputStream in, int state)
          Stores a value in the cache managed by the memory/disk cache containers of the cache manager.
 
Methods implemented from interface com.sssw.fw.api.EbiCacheHolder
clearCache, clearCache, containsContent, displayCacheEntries, getCachedObjects, getContentKeys, getNumberOfCachedEntries, getObjectInCache, getObjectInCache, getObjectInCache, getValueInCache, getValueInCache, putObjectInCache, putObjectInCache, putObjectInCache, putValueInCache, putValueInCache, removeObjectInCache, removeObjectInCache, removeObjectInCache, removeValueInCache, removeValueInCache, setIdentifier
 

Method Detail

getIdentifier

public String getIdentifier()
Gets identifier
Specified by:
getIdentifier in interface EbiCacheHolder
Returns:
it's identifier

putObjectInCache

public void putObjectInCache(String objectType,
                             String componentKey,
                             String contentKey,
                             Object obj,
                             int state)
Stores an object into the cache managed by the object cache container of the cache manager. This method provides state information to allow trigger cache invalidation. This method should be called if a new object (just added to the database) is to be stored in cache or a modified object is to be stored in cache.
Parameters:
objectType - type of the cached object (style, page, etc.)
componentKey - key for the component that owns the object.
contentKey - the content key for the object
obj - the object to be bound; cannot be null
state - EboState.UPDATE (to send a cache invalidation message to cache coordinator) or EboState.SILENCE (to disable the cache invalidation)

putObjectInCache

public void putObjectInCache(String componentKey,
                             String contentKey,
                             Object obj,
                             int state)
Stores an object into the cache managed by the object cache container of the cache manager. This method provides state information to allow trigger cache invalidation. This method should be called if a new object (just added to the database) is to be stored in cache or a modified object is to be stored in cache.
Parameters:
componentKey - key for the component that owns the object.
contentKey - the content key for the object
obj - the object to be bound; cannot be null
state - EboState.UPDATE (to send a cache invalidation message to a cache coordinator) or EboState.SILENCE (to disable the cache invalidation)

putObjectInCache

public void putObjectInCache(Object key,
                             Object obj,
                             int state)
Stores an object into the cache managed by the object cache container of the cache manager. This method provides state information to allow trigger cache invalidation. This method should be used if a new object (just added to the database) is to be stored in cache or a modified object is to be stored in cache.
Parameters:
key - key that owns the object.
obj - the object to be bound; cannot be null
state - EboState.UPDATE (to send a cache invalidation message to a cache coordinator) or EboState.SILENCE (to disable the cache invalidation)

putValueInCache

public void putValueInCache(Object key,
                            int contentType,
                            long contentSize,
                            InputStream in,
                            int state)
Stores a value in the cache managed by the memory/disk cache containers of the cache manager. This method provides state information to allow trigger cache invalidation. This method should be called if a new piece of content (just added to the database) is to be stored in cache or a modified content is to be stored in cache.
Parameters:
key - the content key.
contentType - the content type. (text, image, etc.)
contentSize - the content size.
in - an inputstream for the content data.
state - EboState.UPDATE (to send a cache invalidation message to a cache coordinator) or EboState.SILENCE (to disable the cache invalidation)

putValueInCache

public void putValueInCache(Object key,
                            byte[] data,
                            int state,
                            boolean useDisk)
Stores a value in the cache, with the option to specify whether to use disk caching (when it becomes necessary) and with the option to provide state information to allow triggering of cache invalidation.
Parameters:
key - the key
data - the data to cache
state - EboState.UPDATE (to send a cache invalidation message to a cache coordinator) or EboState.SILENCE (to disable the cache invalidation)
useDisk - if true, disk caching is used (when necessary), otherwise the use of disk caching is blocked

Novell exteNd
Director 5.2 API