org.modeshape.graph.connector.path.cache
Class PathRepositoryCache
java.lang.Object
org.modeshape.graph.connector.path.cache.PathRepositoryCache
@ThreadSafe
public class PathRepositoryCache
- extends Object
The repository-source level cache of workspace names to workspace caches
.
This object gets created for each repository whenever the cache policy
is set. When the cache policy is
modified, the old PathRepositoryCache
is closed
after the new path repository cache is created.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PathRepositoryCache
public PathRepositoryCache(PathCachePolicy policy)
close
public void close()
getCache
public WorkspaceCache getCache(String workspaceName)
- Gets the cache for the named workspace, creating a cache if necessary. Subsequent calls to this method with the same
workspace name must return the exact same cache instance.
- Parameters:
workspaceName
- the name of the workspace for which the cache should be returned.
- Returns:
- the cache instance associated with the workspace; never null
- Throws:
IllegalStateException
- if no cache exists for this workspace and an instance of the
cache class from the policy
cannot be created.
Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.