public abstract class CacheModule extends FactoryModule
Cache
instances in Guice.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MEMORY_MODULE |
static java.lang.String |
PERSISTENT_MODULE |
Constructor and Description |
---|
CacheModule() |
Modifier and Type | Method and Description |
---|---|
protected <K,V> CacheBinding<K,V> |
cache(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valType)
Declare a named in-memory cache.
|
protected <K,V> CacheBinding<K,V> |
cache(java.lang.String name,
java.lang.Class<K> keyType,
com.google.inject.TypeLiteral<V> valType)
Declare a named in-memory cache.
|
protected <K,V> CacheBinding<K,V> |
cache(java.lang.String name,
com.google.inject.TypeLiteral<K> keyType,
com.google.inject.TypeLiteral<V> valType)
Declare a named in-memory cache.
|
protected <K extends java.io.Serializable,V extends java.io.Serializable> |
persist(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valType)
Declare a named in-memory/on-disk cache.
|
protected <K extends java.io.Serializable,V extends java.io.Serializable> |
persist(java.lang.String name,
java.lang.Class<K> keyType,
com.google.inject.TypeLiteral<V> valType)
Declare a named in-memory/on-disk cache.
|
protected <K extends java.io.Serializable,V extends java.io.Serializable> |
persist(java.lang.String name,
com.google.inject.TypeLiteral<K> keyType,
com.google.inject.TypeLiteral<V> valType)
Declare a named in-memory/on-disk cache.
|
factory
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public static final java.lang.String MEMORY_MODULE
public static final java.lang.String PERSISTENT_MODULE
protected <K,V> CacheBinding<K,V> cache(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.protected <K,V> CacheBinding<K,V> cache(java.lang.String name, java.lang.Class<K> keyType, com.google.inject.TypeLiteral<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.protected <K,V> CacheBinding<K,V> cache(java.lang.String name, com.google.inject.TypeLiteral<K> keyType, com.google.inject.TypeLiteral<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.protected <K extends java.io.Serializable,V extends java.io.Serializable> CacheBinding<K,V> persist(java.lang.String name, java.lang.Class<K> keyType, java.lang.Class<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.protected <K extends java.io.Serializable,V extends java.io.Serializable> CacheBinding<K,V> persist(java.lang.String name, java.lang.Class<K> keyType, com.google.inject.TypeLiteral<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.protected <K extends java.io.Serializable,V extends java.io.Serializable> CacheBinding<K,V> persist(java.lang.String name, com.google.inject.TypeLiteral<K> keyType, com.google.inject.TypeLiteral<V> valType)
K
- type of key used to lookup entries.V
- type of value stored by the cache.