|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.connector.path.cache.InMemoryWorkspaceCache.InMemoryCachePolicy
public static class InMemoryWorkspaceCache.InMemoryCachePolicy
Trivial path cache policy implementation that caches all nodes in an in-memory cache.
As a result, this cache policy may not be safe for use with some large repositories as it does not attempt to limit cache attempts based on the size of the node or the current size of the cache.
Constructor Summary | |
---|---|
InMemoryWorkspaceCache.InMemoryCachePolicy()
|
Method Summary | |
---|---|
Class<? extends WorkspaceCache> |
getCacheClass()
Return the class to be used as the cache implementation |
long |
getTimeToLive()
Get the system time in milliseconds before which the node data remains valid. |
void |
setTimeToLive(long timeToLiveInSeconds)
|
boolean |
shouldCache(PathNode node)
Indicates whether the node should be cached . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemoryWorkspaceCache.InMemoryCachePolicy()
Method Detail |
---|
public boolean shouldCache(PathNode node)
PathCachePolicy
shouldCache
in interface PathCachePolicy
node
- the node that may or may not be cached; may not be null
PathCachePolicy.shouldCache(PathNode)
public long getTimeToLive()
CachePolicy
getTimeToLive
in interface CachePolicy
public void setTimeToLive(long timeToLiveInSeconds)
public Class<? extends WorkspaceCache> getCacheClass()
PathCachePolicy
getCacheClass
in interface PathCachePolicy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |