com.avaje.ebean.cache
Interface ServerCacheFactory


public interface ServerCacheFactory

Defines method for constructing caches for beans and queries.


Method Summary
 ServerCache createCache(Class<?> beanType, ServerCacheOptions cacheOptions)
          Create the cache for the given type with options.
 void init(EbeanServer ebeanServer)
          Just after the ServerCacheFactory is constructed this method is called passing the EbeanServer.
 

Method Detail

init

void init(EbeanServer ebeanServer)
Just after the ServerCacheFactory is constructed this method is called passing the EbeanServer.

This is so that a cache implementation can utilise the EbeanServer to populate itself or use the BackgroundExecutor service to schedule periodic cache trimming/cleanup.


createCache

ServerCache createCache(Class<?> beanType,
                        ServerCacheOptions cacheOptions)
Create the cache for the given type with options.



Copyright © 2010. All Rights Reserved.