## org.apache.xerces.parsers
Class CachingParserPool.SynchronizedGrammarPool

    java.lang.Object
      |
      +--org.apache.xerces.parsers.CachingParserPool.SynchronizedGrammarPool

All Implemented Interfaces:
  org.apache.xerces.xni.grammars.XMLGrammarPool

Enclosing class:
  CachingParserPool

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
`CachingParserPool.SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)` Constructs a synchronized grammar pool.

Method Summary
`void` `cacheGrammars(java.lang.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(java.lang.String grammarType)`
`void` `unlockPool()` unlock the grammar pool

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CachingParserPool.SynchronizedGrammarPool

    public CachingParserPool.SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)

  Constructs a synchronized grammar pool.

Method Detail

### retrieveInitialGrammarSet

    public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)

  Specified by:
    `retrieveInitialGrammarSet` 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`

### cacheGrammars

    public void cacheGrammars(java.lang.String grammarType,
                              org.apache.xerces.xni.grammars.Grammar[] grammars)

  Specified by:
    `cacheGrammars` 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`

### clear

    public void clear()

  clear the grammar pool
  Specified by:
    `clear` 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 © 1999-2003 Apache XML Project. All Rights Reserved.