public final class DOMPool extends Object
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
Modifier and Type | Method | Description |
---|---|---|
static void |
clear() |
Clear cache
|
static Document |
getDocument(Object key) |
Return a document.
|
static void |
putDocument(Object key,
Document data) |
Add an object to the cache.
|
public static Document getDocument(Object key)
key
- key of the documentpublic static void putDocument(Object key, Document data)
key
- key of the documentdata
- Document to storepublic static void clear()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.