com.avaje.ebean.cache
Interface ServerCacheManager


public interface ServerCacheManager

The cache service for server side caching of beans and query results.


Method Summary
 void clear(Class<?> beanType)
          This clears both the bean and query cache for a given type.
 void clearAll()
          Clear all the caches.
 ServerCache getBeanCache(Class<?> beanType)
          Return the cache for beans of a particular type.
 ServerCache getQueryCache(Class<?> beanType)
          Return the cache for query results of a particular type of bean.
 void init(EbeanServer server)
          This method is called just after the construction of the ServerCacheManager.
 boolean isBeanCaching(Class<?> beanType)
          Return true if there is an active bean cache for this type of bean.
 

Method Detail

init

void init(EbeanServer server)
This method is called just after the construction of the ServerCacheManager.

The EbeanServer is provided so that cache implementations can make use of EbeanServer and BackgroundExecutor for automatically populating and background trimming of the cache.


isBeanCaching

boolean isBeanCaching(Class<?> beanType)
Return true if there is an active bean cache for this type of bean.


getBeanCache

ServerCache getBeanCache(Class<?> beanType)
Return the cache for beans of a particular type.


getQueryCache

ServerCache getQueryCache(Class<?> beanType)
Return the cache for query results of a particular type of bean.


clear

void clear(Class<?> beanType)
This clears both the bean and query cache for a given type.


clearAll

void clearAll()
Clear all the caches.



Copyright © 2010. All Rights Reserved.