| |
|
| java.lang.Object org.apache.xerces.jaxp.validation.SoftReferenceGrammarPool
SoftReferenceGrammarPool | final class SoftReferenceGrammarPool implements XMLGrammarPool(Code) | | This grammar pool is a memory sensitive cache. The grammars
stored in the pool are softly reachable and may be cleared by
the garbage collector in response to memory demand. Equality
of XMLSchemaDescription s is determined using both
the target namespace for the schema and schema location.
author: Michael Glavassevich, IBM version: $Id: SoftReferenceGrammarPool.java 447235 2006-09-18 05:01:44Z mrglavas $ |
Inner Class :final static class Entry | |
Inner Class :final static class SoftGrammarReference extends SoftReference | |
TABLE_SIZE | final protected static int TABLE_SIZE(Code) | | Default size.
|
ZERO_LENGTH_GRAMMAR_ARRAY | final protected static Grammar[] ZERO_LENGTH_GRAMMAR_ARRAY(Code) | | Zero length grammar array.
|
fGrammarCount | protected int fGrammarCount(Code) | | The number of grammars in the pool
|
fGrammars | protected Entry[] fGrammars(Code) | | Grammars.
|
fPoolIsLocked | protected boolean fPoolIsLocked(Code) | | Flag indicating whether this pool is locked
|
fReferenceQueue | final protected ReferenceQueue fReferenceQueue(Code) | | Reference queue for cleared grammar references
|
SoftReferenceGrammarPool | public SoftReferenceGrammarPool()(Code) | | Constructs a grammar pool with a default number of buckets.
|
SoftReferenceGrammarPool | public SoftReferenceGrammarPool(int initialCapacity)(Code) | | Constructs a grammar pool with a specified number of buckets.
|
clear | public void clear()(Code) | | |
containsGrammar | public boolean containsGrammar(XMLGrammarDescription desc)(Code) | | Returns true if the grammar pool contains a grammar associated
to the specified grammar description. Currently, the root element name
is used as the key for DTD grammars and the target namespace is used
as the key for Schema grammars.
Parameters: desc - The Grammar Description. |
equals | public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2)(Code) | | This method checks whether two grammars are the same. Currently, we compare
the root element names for DTD grammars and the target namespaces for Schema grammars.
The application can override this behaviour and add its own logic.
Parameters: desc1 - The grammar description Parameters: desc2 - The grammar description of the grammar to be compared to True if the grammars are equal, otherwise false |
getGrammar | public Grammar getGrammar(XMLGrammarDescription desc)(Code) | | Returns the grammar associated to the specified grammar description.
Currently, the root element name is used as the key for DTD grammars
and the target namespace is used as the key for Schema grammars.
Parameters: desc - The Grammar Description. |
hashCode | public int hashCode(XMLGrammarDescription desc)(Code) | | Returns the hash code value for the given grammar description.
Parameters: desc - The grammar description The hash code value |
lockPool | public void lockPool()(Code) | | |
putGrammar | public void putGrammar(Grammar grammar)(Code) | | Puts the specified grammar into the grammar pool and associates it to
its root element name or its target namespace.
Parameters: grammar - The Grammar. |
removeGrammar | public Grammar removeGrammar(XMLGrammarDescription desc)(Code) | | Removes the grammar associated to the specified grammar description from the
grammar pool and returns the removed grammar. Currently, the root element name
is used as the key for DTD grammars and the target namespace is used
as the key for Schema grammars.
Parameters: desc - The Grammar Description. The removed grammar. |
unlockPool | public void unlockPool()(Code) | | |
|
|
|