org.norther.tammi.core.cache
Interface CacheClient

All Superinterfaces:
Refreshable
All Known Subinterfaces:
CachedMediaProvider, CacheMonitor, FallbackMap, FormFilter, HibernatePersisterFactory, HostFilter, JSPEngine, KeyCacheClient, LayoutFilter, Logger, OJBPersisterFactory, PageFilter, PersisterFactory, PipeFilter, ResourceFilter, ResourceFinder, ResourceMap, ServiceFilter, ServletEngine, ServletMediaProvider, TaskLoader, TemplateEngine, ThreadedLogger, XMLPersisterFactory
All Known Implementing Classes:
AbstractLogger, AbstractPersisterFactory, AbstractTemplateEngine, AbstractThreadedLogger, DefaultCacheClient, DefaultCachedMediaProvider, DefaultCacheMonitor, DefaultFallbackMap, DefaultFormFilter, DefaultHibernatePersisterFactory, DefaultHostFilter, DefaultJSPEngine, DefaultKeyCacheClient, DefaultLayoutFilter, DefaultOJBPersisterFactory, DefaultPageFilter, DefaultPipeFilter, DefaultResourceFilter, DefaultResourceFinder, DefaultResourceMap, DefaultServiceFilter, DefaultServletEngine, DefaultServletMediaProvider, DefaultTaskLoader, DefaultXMLPersisterFactory, FreemarkerEngine, JDK4Logger, Log4JLogger, VelocityEngine

public interface CacheClient
extends Refreshable

An interface to objects maintaining other objects in caches. This interface provides methods for memory managers and other cache controllers.

Author:
Ilkka Priha

Method Summary
 void clearCached()
          Clears all cached entries without notifying.
 void expireCached(long timestamp)
          Expires all cached entries notifying them about expiration.
 void expireFraction(long timestamp, float fraction)
          Expires the specified fraction of cached entries notifying them about expiration.
 ConcurrentMap getCache(boolean create)
          Gets and optionally creates the cache.
 boolean isCachingDisabled()
          Checks whether the caching is disabled.
 void removeCache()
          Removes the cache.
 void setCachingDisabled(boolean flag)
          Sets the caching disabled flag.
 
Methods inherited from interface org.norther.tammi.core.base.Refreshable
getRefreshed, refresh
 

Method Detail

isCachingDisabled

boolean isCachingDisabled()
Checks whether the caching is disabled.

Returns:
true if the caching is disabled, true otherwise.

setCachingDisabled

void setCachingDisabled(boolean flag)
Sets the caching disabled flag.

Parameters:
flag - the caching disabled flag.

expireCached

void expireCached(long timestamp)
Expires all cached entries notifying them about expiration.

Parameters:
timestamp - the timestamp of the expiration.

expireFraction

void expireFraction(long timestamp,
                    float fraction)
Expires the specified fraction of cached entries notifying them about expiration.

Parameters:
timestamp - the timestamp of the expiration.
fraction - the fraction of entries to expire (0.0..1.0).

clearCached

void clearCached()
Clears all cached entries without notifying.


getCache

ConcurrentMap getCache(boolean create)
Gets and optionally creates the cache.

Parameters:
create - true to create a missing cache.
Returns:
the cache or null if disabled.

removeCache

void removeCache()
Removes the cache.



Copyright © 2004 The Norther Organization. All rights reserved.