Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.protocol.http.util » [javadoc | source]
org.apache.jmeter.protocol.http.util
public final class: DOMPool [javadoc | source]
java.lang.Object
   org.apache.jmeter.protocol.http.util.DOMPool
The purpose of this class is to cache the DOM Documents in memory and by-pass parsing. For old systems or laptops, it's not practical to parse the XML documents every time. Therefore using a memory cache can reduce the CPU usage.

For now this is a simple version to test the feasibility of caching. If it works, this class will be replaced with an Apache commons or something equivalent. If I was familiar with Apache Commons Pool, I would probably use it, but since I don't know the API, it is quicker for Proof of Concept to just write a dumb one. If the number documents in the pool exceed several hundred, it will take a long time for the lookup.

Created on: Jun 17, 2003
Method from org.apache.jmeter.protocol.http.util.DOMPool Summary:
getDocument,   putDocument
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jmeter.protocol.http.util.DOMPool Detail:
 public static synchronized Document getDocument(Object key) 
    Return a document.
 public static synchronized  void putDocument(Object key,
    Object data) 
    Add an object to the cache.