org.apache.xerces.parsers

Class CachingParserPool.SynchronizedGrammarPool

Enclosing Class:
CachingParserPool
Implemented Interfaces:
org.apache.xerces.xni.grammars.XMLGrammarPool

public static final class CachingParserPool.SynchronizedGrammarPool
extends java.lang.Object
implements org.apache.xerces.xni.grammars.XMLGrammarPool

Synchronized grammar pool.
Author:
Andy Clark, IBM

Constructor Summary

SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a synchronized grammar pool.

Method Summary

void
cacheGrammars(String grammarType, org.apache.xerces.xni.grammars.Grammar[] grammars)
void
clear()
clear the grammar pool
void
lockPool()
lock the grammar pool
org.apache.xerces.xni.grammars.Grammar
retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
org.apache.xerces.xni.grammars.Grammar[]
retrieveInitialGrammarSet(String grammarType)
void
unlockPool()
unlock the grammar pool

Constructor Details

SynchronizedGrammarPool

public SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a synchronized grammar pool.

Method Details

cacheGrammars

public void cacheGrammars(String grammarType,
                          org.apache.xerces.xni.grammars.Grammar[] grammars)
Specified by:
cacheGrammars in interface org.apache.xerces.xni.grammars.XMLGrammarPool

clear

public void clear()
clear the grammar pool
Specified by:
clear in interface org.apache.xerces.xni.grammars.XMLGrammarPool

lockPool

public void lockPool()
lock the grammar pool
Specified by:
lockPool in interface org.apache.xerces.xni.grammars.XMLGrammarPool

retrieveGrammar

public org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
Specified by:
retrieveGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarPool

retrieveInitialGrammarSet

public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(String grammarType)
Specified by:
retrieveInitialGrammarSet in interface org.apache.xerces.xni.grammars.XMLGrammarPool

unlockPool

public void unlockPool()
unlock the grammar pool
Specified by:
unlockPool in interface org.apache.xerces.xni.grammars.XMLGrammarPool

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.