|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.connector.jbosscache.JBossCacheWorkspaces
@ThreadSafe public class JBossCacheWorkspaces
This class represents a set of workspaces used by the JBoss Cache connector
.
Constructor Summary | |
---|---|
JBossCacheWorkspaces(String sourceName,
org.jboss.cache.CacheFactory<Name,Object> cacheFactory,
String defaultCacheFactoryConfigurationName,
Set<String> initialNames,
Context jndiContext)
Create a new instance of the workspace and cache manager for the JBoss Cache connector. |
Method Summary | |
---|---|
org.jboss.cache.Cache<Name,Object> |
createWorkspace(String workspaceName)
Attempt to create a new workspace with the supplied name. |
org.jboss.cache.Cache<Name,Object> |
getWorkspace(String workspaceName,
boolean createIfMissing)
Get the cache that corresponds to the supplied workspace name, and optionally create a new cache if no such cache already exists. |
Set<String> |
getWorkspaceNames()
Return an immutable set of names for the currently available workspaces. |
boolean |
removeWorkspace(String workspaceName)
Remove the cache that corresponds to the supplied workspace name as no longer being available. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JBossCacheWorkspaces(String sourceName, org.jboss.cache.CacheFactory<Name,Object> cacheFactory, String defaultCacheFactoryConfigurationName, Set<String> initialNames, Context jndiContext)
sourceName
- the name of the source that uses this object; may not be nullcacheFactory
- the factory that should be used to create new caches; may not be nulldefaultCacheFactoryConfigurationName
- the name of the configuration that is supplied to the cache
factory
to create the new cache
if the workspace name does not correspond
to a configuration; may be nullinitialNames
- the initial names for the workspaces; may be null or emptyjndiContext
- the JNDI context that should be used, or null if JNDI should not be used at allMethod Detail |
---|
public org.jboss.cache.Cache<Name,Object> createWorkspace(String workspaceName)
workspaceName
- the name of the new workspace, which may be a valid URI if the cache is to be found in JNDI
public org.jboss.cache.Cache<Name,Object> getWorkspace(String workspaceName, boolean createIfMissing)
Cache
instances previously found for the same workspace name. If no cache is
found, this method then checks whether the supplied workspace name is a valid URI, and if so the method looks for a
Cache
instance in JNDI at that URI. If none is found (or the name is not a valid URI), this method then creates a
new Cache
instance using the CacheFactory
supplied in the constructor.
workspaceName
- the name of the workspace, which may be a valid URI if the cache is to be found in JNDIcreateIfMissing
- true if the cache should be created if no such cache already exists
public Set<String> getWorkspaceNames()
public boolean removeWorkspace(String workspaceName)
workspaceName
- the name of the existing workspace that is to be removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |