SableJBDD.bdd.internal
Class ReclaimableNodePool

java.lang.Object
  extended bySableJBDD.bdd.internal.BddNodePool
      extended bySableJBDD.bdd.internal.ReclaimableNodePool
All Implemented Interfaces:
BddNodeFactory, Profiling
Direct Known Subclasses:
DynamicNodePool, ExpandibleNodePool, FixedSizeNodePool

public abstract class ReclaimableNodePool
extends BddNodePool

A reclaimable node pool creates a phantom reference for each newly created node. Any unreachable node is put in a reference queue, and it recycles reference queue at certain time.


Field Summary
 
Fields inherited from interface SableJBDD.bdd.util.Profiling
PROFILING
 
Constructor Summary
ReclaimableNodePool(int size)
          Defines a pool with an initial number of pre-allocated nodes.
 
Method Summary
 JBddNode getFreshNode(JBddVariable var, JBddNode low, JBddNode high)
          Gets a node from a pool either by reusing an existing node or by creating a new object.
 void reportStatistics(java.io.PrintStream out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReclaimableNodePool

public ReclaimableNodePool(int size)
Defines a pool with an initial number of pre-allocated nodes. Creates a phontom reference for each node.

Method Detail

getFreshNode

public JBddNode getFreshNode(JBddVariable var,
                             JBddNode low,
                             JBddNode high)
Gets a node from a pool either by reusing an existing node or by creating a new object. NOTE: a JBddNode is a unique object,

Specified by:
getFreshNode in interface BddNodeFactory
Overrides:
getFreshNode in class BddNodePool

reportStatistics

public void reportStatistics(java.io.PrintStream out)
Specified by:
reportStatistics in interface Profiling
Overrides:
reportStatistics in class BddNodePool