org.apache.manifoldcf.core.cachemanager
Class GeneralCache.ExpirationTree

java.lang.Object
  extended by org.apache.manifoldcf.core.cachemanager.GeneralCache.ExpirationTree
Enclosing class:
GeneralCache

protected class GeneralCache.ExpirationTree
extends java.lang.Object

This class represents a timed expiration tree. Expiration is used to order the nodes.


Field Summary
protected  GeneralCache.ExpirationTreeNode root
           
 
Constructor Summary
GeneralCache.ExpirationTree()
           
 
Method Summary
 void addEntry(GeneralCache.ObjectRecord x)
          This method MUST NOT have the entry in the tree already before being called!
protected  void addTreeToBranch(GeneralCache.ExpirationTreeNode parent, boolean parentLesser, GeneralCache.ExpirationTreeNode toAdd)
          This method files a subtree (represented by toAdd) beneath a branch, which is represented by the parent parameters.
 GeneralCache.ObjectRecord getOldestEntry()
           
 void removeEntry(GeneralCache.ObjectRecord x)
          This method MUST have the entry in the tree before being called!
protected  void setPointer(GeneralCache.ExpirationTreeNode parent, boolean isLesser, GeneralCache.ExpirationTreeNode toAdd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

protected GeneralCache.ExpirationTreeNode root
Constructor Detail

GeneralCache.ExpirationTree

public GeneralCache.ExpirationTree()
Method Detail

removeEntry

public void removeEntry(GeneralCache.ObjectRecord x)
This method MUST have the entry in the tree before being called!


addTreeToBranch

protected void addTreeToBranch(GeneralCache.ExpirationTreeNode parent,
                               boolean parentLesser,
                               GeneralCache.ExpirationTreeNode toAdd)
This method files a subtree (represented by toAdd) beneath a branch, which is represented by the parent parameters. If parent is null, then the overall root of the tree is the start point. If the parent is NOT null, then parentLesser describes whether the lesser branch is the one being modified. The logic determines the shallowest legal placement of the toAdd node(s), and inserts them there.


addEntry

public void addEntry(GeneralCache.ObjectRecord x)
This method MUST NOT have the entry in the tree already before being called!


setPointer

protected void setPointer(GeneralCache.ExpirationTreeNode parent,
                          boolean isLesser,
                          GeneralCache.ExpirationTreeNode toAdd)

getOldestEntry

public GeneralCache.ObjectRecord getOldestEntry()