|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.connector.base.cache.InMemoryNodeCache.MapCachePolicy<NodeType>
NodeType
- the node type that is being cachedpublic static class InMemoryNodeCache.MapCachePolicy<NodeType extends MapNode>
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 | |
---|---|
InMemoryNodeCache.MapCachePolicy()
|
|
InMemoryNodeCache.MapCachePolicy(long timeToLiveInSeconds)
|
Method Summary | |
---|---|
long |
getTimeToLive()
Get the system time in milliseconds before which the node data remains valid. |
InMemoryNodeCache.MapCache<NodeType> |
newCache()
Return a new cache instance that uses this policy . |
void |
setTimeToLive(long timeToLiveInSeconds)
|
boolean |
shouldCache(NodeType 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 InMemoryNodeCache.MapCachePolicy()
public InMemoryNodeCache.MapCachePolicy(long timeToLiveInSeconds)
Method Detail |
---|
public boolean shouldCache(NodeType node)
NodeCachePolicy
shouldCache
in interface NodeCachePolicy<UUID,NodeType extends MapNode>
node
-
NodeCachePolicy.shouldCache(Node)
public long getTimeToLive()
CachePolicy
getTimeToLive
in interface CachePolicy
public void setTimeToLive(long timeToLiveInSeconds)
public InMemoryNodeCache.MapCache<NodeType> newCache()
NodeCachePolicy
uses this policy
.
newCache
in interface NodeCachePolicy<UUID,NodeType extends MapNode>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |