|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CacheManager
A repository that manages Caches and associated Services.
| Method Summary | ||
|---|---|---|
void |
close()
Transitions this CacheManager to UNINITIALIZED. |
|
|
createCache(java.lang.String alias,
Builder<? extends CacheConfiguration<K,V>> configBuilder)
Creates a Cache in this CacheManager according to the specified CacheConfiguration provided
through a Builder. |
|
|
createCache(java.lang.String alias,
CacheConfiguration<K,V> config)
Creates a Cache in this CacheManager according to the specified CacheConfiguration. |
|
|
getCache(java.lang.String alias,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Retrieves the Cache associated with the given alias, if one is known. |
|
Configuration |
getRuntimeConfiguration()
Returns the current Configuration used by this CacheManager. |
|
Status |
getStatus()
Returns the current Status of this CacheManager. |
|
void |
init()
Transitions this CacheManager to AVAILABLE. |
|
void |
removeCache(java.lang.String alias)
Removes the Cache associated with the alias provided, if one is known. |
|
| Method Detail |
|---|
<K,V> Cache<K,V> createCache(java.lang.String alias,
CacheConfiguration<K,V> config)
Cache in this CacheManager according to the specified CacheConfiguration.
The returned Cache will be in status AVAILABLE.
K - the key type for the cacheV - the value type for the cachealias - the alias under which the cache will be createdconfig - the configuration of the cache to create
Cache
java.lang.IllegalArgumentException - if there is already a cache registered with the given alias
java.lang.IllegalStateException - if the cache creation fails
<K,V> Cache<K,V> createCache(java.lang.String alias,
Builder<? extends CacheConfiguration<K,V>> configBuilder)
Cache in this CacheManager according to the specified CacheConfiguration provided
through a Builder.
The returned Cache will be in status AVAILABLE.
K - the key type for the cacheV - the value type for the cachealias - the alias under which the cache will be createdconfigBuilder - the builder for the configuration of the cache to create
Cache
java.lang.IllegalArgumentException - if there is already a cache registered with the given alias
java.lang.IllegalStateException - if the cache creation fails
<K,V> Cache<K,V> getCache(java.lang.String alias,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Cache associated with the given alias, if one is known.
K - the key type for the cacheV - the value type for the cachealias - the alias under which to look the Cache upkeyType - the Cache key classvalueType - the Cache value class
Cache associated with the given alias, null if no such cache exists
java.lang.IllegalArgumentException - if the keyType or valueType do not match the ones with which the
Cache was createdvoid removeCache(java.lang.String alias)
Cache associated with the alias provided, if one is known.
When the cache is removed, it will release all resources it used.
alias - the alias for which to remove the Cache
void init()
throws StateTransitionException
CacheManager to AVAILABLE.
This will start all Services managed by this CacheManager, as well
as initializing all Caches registered with it.
If an error occurs before the CacheManager is AVAILABLE, it will revert to
UNINITIALIZED attempting to close all services it had already started.
java.lang.IllegalStateException - if the CacheManager is not UNINITIALIZED
StateTransitionException - if the CacheManager could not be made AVAILABLE
void close()
throws StateTransitionException
CacheManager to UNINITIALIZED.
This will close all Caches known to this CacheManager and stop all
Services managed by this CacheManager.
Failure to close any Cache or to stop any Service will not prevent others from being closed or
stopped.
close in interface java.io.CloseableStateTransitionException - if the CacheManager could not reach UNINITIALIZED cleanly
java.lang.IllegalStateException - if the CacheManager is not AVAILABLEStatus getStatus()
Status of this CacheManager.
StatusConfiguration getRuntimeConfiguration()
Configuration used by this CacheManager.
CacheManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||