|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheManager
Factory and registry for JBoss Cache instances configured using named configurations.
Method Summary | |
---|---|
Cache<Object,Object> |
getCache(String configName,
boolean create)
Get a cache configured according to the given configuration name, optionally instantiating the cache if it hasn't already been instantiated. |
Set<String> |
getCacheNames()
Gets the name of all caches that are registered, i.e. |
org.jgroups.ChannelFactory |
getChannelFactory()
Gets the JGroups ChannelFactory that will be injected
into any Configuration that has a
multiplexer stack
configured. |
Set<String> |
getConfigurationNames()
Gets the names of all the configurations of which this object is aware. |
void |
releaseCache(String configName)
Notifies the registry that the caller is no longer using the given cache. |
Method Detail |
---|
Set<String> getConfigurationNames()
null
.Set<String> getCacheNames()
getCache(name, false)
.
null
.org.jgroups.ChannelFactory getChannelFactory()
ChannelFactory
that will be injected
into any Configuration
that has a
multiplexer stack
configured.
Cache<Object,Object> getCache(String configName, boolean create) throws Exception
The caller is free to invoke the Cache.create()
and
Cache.start()
lifecycle methods on the returned cache, but
the @link Cache#stop()} and Cache.destroy()
methods should not
be invoked, since it is quite possible other users are still using the
cache. Use releaseCache(String)
to notify this
registry that the caller is no longer using a cache; let the registry
control stopping and destroying the cache.
If invoking this method leads to the instantiation of the cache,
create()
and start()
will not be invoked
on the cache before it is returned.
configName
- the name of the configurationcreate
- should the cache be instantiated if it
hasn't already been?
null
if
create
is false and the cache hasn't
been created previously.
IllegalArgumentException
- if this object is unaware of
configName
; i.e. the set
returned from getConfigurationNames()
does not include configName
Exception
- if there is a problem instantiating the cachevoid releaseCache(String configName)
configName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |