|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.persistence.util.BundleCache
public class BundleCache
This Class implements a simple cache for nodeprop bundles
| Constructor Summary | |
|---|---|
BundleCache(long maxSize)
Creates a new BundleCache |
|
| Method Summary | |
|---|---|
void |
clear()
Clears this cache and removes all bundles. |
boolean |
contains(NodeId id)
Checks if the bundle with the given id is cached. |
NodePropBundle |
get(NodeId id)
Returns the bundle with the given id or null
if the bundle is not cached. |
long |
getMaxSize()
Returns the maximum cache size in bytes. |
void |
put(NodePropBundle bundle)
Puts a bunlde to the cache. |
NodePropBundle |
remove(NodeId id)
Removes a bundle from this cache. |
void |
setMaxSize(long maxSize)
Sets the maximum cache size in bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BundleCache(long maxSize)
maxSize - the maximum size of this cache in bytes.| Method Detail |
|---|
public long getMaxSize()
public void setMaxSize(long maxSize)
maxSize - the maximum cache size in bytes.public NodePropBundle get(NodeId id)
id or null
if the bundle is not cached.
id - the id of the bundle
nullpublic void put(NodePropBundle bundle)
max size of the cache it will remove bundles from
this cache until the limit is satisfied.
bundle - the bunlde to put to the cachepublic boolean contains(NodeId id)
id - the id of the bundle
true if the bundle is cached;
false otherwise.public NodePropBundle remove(NodeId id)
id - the id of the bunlde to remove.
null of the bundle
was not cached.public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||