org.exist.storage
Class XQueryPool

java.lang.Object
  extended byorg.exist.util.hashtable.AbstractHashtable
      extended byorg.exist.util.hashtable.Object2ObjectHashMap
          extended byorg.exist.storage.XQueryPool

public class XQueryPool
extends Object2ObjectHashMap

Global pool for pre-compiled XQuery expressions. Expressions are stored and retrieved from the pool by comparing the Source objects from which they were created. For each XQuery, a maximum of MAX_STACK_SIZE compiled expressions are kept in the pool. An XQuery expression will be removed from the pool if it has not been used for a pre-defined timeout. These settings can be configured in conf.xml.

Author:
wolf

Nested Class Summary
 
Nested classes inherited from class org.exist.util.hashtable.Object2ObjectHashMap
Object2ObjectHashMap.Object2ObjectIterator
 
Nested classes inherited from class org.exist.util.hashtable.AbstractHashtable
AbstractHashtable.HashtableIterator, AbstractHashtable.HashtableOverflowException
 
Field Summary
static int MAX_POOL_SIZE
           
static int MAX_STACK_SIZE
           
static long TIMEOUT
           
static long TIMEOUT_CHECK_INTERVAL
           
 
Fields inherited from class org.exist.util.hashtable.Object2ObjectHashMap
keys, values
 
Fields inherited from class org.exist.util.hashtable.AbstractHashtable
items, maxRehash, REMOVED, tabSize
 
Constructor Summary
XQueryPool(Configuration conf)
           
 
Method Summary
 CompiledXQuery borrowCompiledXQuery(DBBroker broker, Source source)
           
 void returnCompiledXQuery(Source source, CompiledXQuery xquery)
           
 
Methods inherited from class org.exist.util.hashtable.Object2ObjectHashMap
get, getIndex, hash, insert, iterator, put, rehash, remove, valueIterator
 
Methods inherited from class org.exist.util.hashtable.AbstractHashtable
getMaxRehash, isPrime, nextPrime, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_POOL_SIZE

public static final int MAX_POOL_SIZE
See Also:
Constant Field Values

MAX_STACK_SIZE

public static final int MAX_STACK_SIZE
See Also:
Constant Field Values

TIMEOUT

public static final long TIMEOUT
See Also:
Constant Field Values

TIMEOUT_CHECK_INTERVAL

public static final long TIMEOUT_CHECK_INTERVAL
See Also:
Constant Field Values
Constructor Detail

XQueryPool

public XQueryPool(Configuration conf)
Parameters:
conf -
Method Detail

returnCompiledXQuery

public void returnCompiledXQuery(Source source,
                                 CompiledXQuery xquery)

borrowCompiledXQuery

public CompiledXQuery borrowCompiledXQuery(DBBroker broker,
                                           Source source)


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.