|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CacheManager
A CacheManager that manages Cache as well as associated Service
| Method Summary | ||
|---|---|---|
void |
close()
Releases all data held in Cache instances managed by this CacheManager, as well as all
Service this instance provides to managed Cache instances. |
|
|
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. |
|
RuntimeConfiguration |
getRuntimeConfiguration()
Returns the current RuntimeConfiguration used by this CacheManager |
|
Status |
getStatus()
Returns the current Status for this CacheManager |
|
void |
init()
Attempts at having this CacheManager go to Status.AVAILABLE, starting all
Service instances managed by this CacheManager, as well
as all Cache pre registered with it. |
|
void |
removeCache(java.lang.String alias)
Removes the Cache associated with the alias provided, if oe 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.
K - the type of the keys used to access data within this cacheV - the type of the values held within this 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> 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 type of the keys used to access data within this cacheV - the type of the values held within this 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 association 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 oe is known.
When the cache is removed, it will release all resources it used.
alias - the alias for which to remove the Cachevoid init()
Status.AVAILABLE, starting all
Service instances managed by this CacheManager, as well
as all Cache pre registered with it.
Should this throw, while the CacheManager isn't yet Status.AVAILABLE, it will go back
to Status.UNINITIALIZED properly (i.e. closing all services it already started,
but which in turn may fail too).
java.lang.IllegalStateException - if the CacheManager isn't in Status.UNINITIALIZED state
StateTransitionException - if the CacheManager couldn't be made Status.AVAILABLE
java.lang.RuntimeException - if any exception is thrown, but still results in the CacheManager transitioning to Status.AVAILABLEvoid close()
Cache instances managed by this CacheManager, as well as all
Service this instance provides to managed Cache instances.
Should this throw, while the CacheManager isn't yet Status.UNINITIALIZED, it will keep on
trying to go to Status.UNINITIALIZED properly (i.e. closing all other services it didn't yet stop).
StateTransitionException - if the CacheManager couldn't be cleanly made
Status.UNINITIALIZED,
wrapping the first exception encountered
java.lang.RuntimeException - if any exception is thrown, like from ListenersStatus getStatus()
Status for this CacheManager
StatusRuntimeConfiguration getRuntimeConfiguration()
RuntimeConfiguration used by this CacheManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||