Package org.apache.velocity.runtime
Interface ParserPool
-
- All Known Implementing Classes:
ParserPoolImpl
public interface ParserPoolProvides instances of parsers as needed. get() will return a new parser if available. If a parser is acquired from the pool, put() should be called with that parser to make it available again for reuse.- Since:
- 1.5
- Version:
- $Id: RuntimeInstance.java 384374 2006-03-08 23:19:30Z nbubna $
- Author:
- Serge Knystautas
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Parserget()Retrieve an instance of a parser pool.voidinitialize(RuntimeServices svc)Initialize the pool so that it can begin serving parser instances.voidput(Parser parser)Return the parser to the pool so that it may be reused.
-
-
-
Method Detail
-
initialize
void initialize(RuntimeServices svc)
Initialize the pool so that it can begin serving parser instances.- Parameters:
svc-
-
get
Parser get()
Retrieve an instance of a parser pool.- Returns:
- A parser object.
-
put
void put(Parser parser)
Return the parser to the pool so that it may be reused.- Parameters:
parser-
-
-