org.exist.util.pool
Class NodePool

java.lang.Object
  extended by org.exist.util.pool.NodePool

public class NodePool
extends Object

A pool of node objects. Storing a resource creates many, short-lived DOM node objects. To reduce garbage collection, we use a pool to cache a certain number of objects.


Field Summary
static int MAX_OBJECTS
           
 
Constructor Summary
NodePool(int maxObjects)
           
 
Method Summary
 NodeImpl borrowNode(short key)
           
static NodePool getInstance()
           
 int getSize(short key)
           
 void returnNode(NodeImpl node)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_OBJECTS

public static final int MAX_OBJECTS
See Also:
Constant Field Values
Constructor Detail

NodePool

public NodePool(int maxObjects)
Method Detail

getInstance

public static NodePool getInstance()

borrowNode

public NodeImpl borrowNode(short key)

returnNode

public void returnNode(NodeImpl node)

getSize

public int getSize(short key)


Copyright (C) Wolfgang Meier. All rights reserved.