Package play.cache.ehcache
Interface EhCacheComponents
-
- All Superinterfaces:
AkkaComponents
,ConfigurationComponents
public interface EhCacheComponents extends ConfigurationComponents, AkkaComponents
EhCache Java Components for compile time injection.Usage:
public class MyComponents extends BuiltInComponentsFromContext implements EhCacheComponents { public MyComponents(ApplicationLoader.Context context) { super(context); } // A service class that depends on cache APIs public CachedService someService() { // defaultCacheApi is provided by EhCacheComponents return new CachedService(defaultCacheApi()); } // Another service that depends on a specific named cache public AnotherService someService() { // cacheApi provided by EhCacheComponents and // "anotherService" is the name of the cache. return new CachedService(cacheApi("anotherService")); } // other methods }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ApplicationLifecycle
applicationLifecycle()
default AsyncCacheApi
cacheApi(String name)
default AsyncCacheApi
defaultCacheApi()
default net.sf.ehcache.CacheManager
ehCacheManager()
Environment
environment()
-
Methods inherited from interface play.components.AkkaComponents
actorSystem, coordinatedShutdown, executionContext, materializer
-
Methods inherited from interface play.components.ConfigurationComponents
config, configuration
-
-
-
-
Method Detail
-
environment
Environment environment()
-
applicationLifecycle
ApplicationLifecycle applicationLifecycle()
-
ehCacheManager
default net.sf.ehcache.CacheManager ehCacheManager()
-
cacheApi
default AsyncCacheApi cacheApi(String name)
-
defaultCacheApi
default AsyncCacheApi defaultCacheApi()
-
-