|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- the key typeV
- the value typepublic interface CacheBuilder<K,V>
A CacheBuilder is used for creating Caches.
A CacheBuilder is created by CacheManager.createCacheBuilder(String)
and is associated with that
manager.
Additional configuration methods may be available on a builder instance by casting to a concrete implementation.
Method Summary | |
---|---|
Cache<K,V> |
build()
Create an instance of the named Cache . |
CacheBuilder<K,V> |
registerCacheEntryListener(CacheEntryListener<K,V> cacheEntryListener,
NotificationScope scope,
boolean synchronous)
Registers a listener. |
CacheBuilder<K,V> |
setCacheConfiguration(CacheConfiguration configuration)
Set the cache configuration. |
CacheBuilder<K,V> |
setCacheLoader(CacheLoader<K,V> cacheLoader)
Set the cache loader. |
Method Detail |
---|
Cache<K,V> build()
Cache
.
The Cache will be created, added to the caches controlled by its associated CacheManager and started.
If there is an existing Cache of the same name associated with this CacheManager when build is invoked,
the old Cache will be stopped.
InvalidConfigurationException
- thrown if the configuration is invalidCacheManager.createCacheBuilder(String)
CacheBuilder<K,V> setCacheConfiguration(CacheConfiguration configuration)
configuration
- the cache configuration
CacheBuilder<K,V> setCacheLoader(CacheLoader<K,V> cacheLoader)
cacheLoader
- the CacheLoader
CacheBuilder<K,V> registerCacheEntryListener(CacheEntryListener<K,V> cacheEntryListener, NotificationScope scope, boolean synchronous)
cacheEntryListener
- the listenerscope
- the notification scope.synchronous
- whether to listener should be invoked synchronously
NullPointerException
- if any of the arguments are null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |