Class PathRepositoryCache

  extended by org.modeshape.graph.connector.path.cache.PathRepositoryCache

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.

Constructor Summary
PathRepositoryCache(PathCachePolicy policy)
Method Summary
 void close()
 WorkspaceCache getCache(String workspaceName)
          Gets the cache for the named workspace, creating a cache if necessary.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PathRepositoryCache(PathCachePolicy policy)
Method Detail


public void close()


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.

workspaceName - the name of the workspace for which the cache should be returned.
the cache instance associated with the workspace; never null
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.