Package org.smooks.engine.delivery
Class DynamicReaderPool
- java.lang.Object
-
- org.smooks.engine.delivery.DynamicReaderPool
-
- All Implemented Interfaces:
ReaderPool
public class DynamicReaderPool extends Object implements ReaderPool
A pool of readers without an upper bound which means that it grows on-demand.
-
-
Constructor Summary
Constructors Constructor Description DynamicReaderPool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLReader
borrowXMLReader()
Gets anXMLReader
instance from the reader pool associated with this ContentDelivery config instance.Map<String,String>
getProperties()
Returns implementation-specificProperties
.void
returnXMLReader(XMLReader xmlReader)
Return anXMLReader
instance to the reader pool associated with this ContentDelivery config instance.
-
-
-
Method Detail
-
borrowXMLReader
public XMLReader borrowXMLReader()
Description copied from interface:ReaderPool
Gets anXMLReader
instance from the reader pool associated with this ContentDelivery config instance.- Specified by:
borrowXMLReader
in interfaceReaderPool
- Returns:
- An XMLReader instance if the pool is not empty, otherwise null
-
returnXMLReader
public void returnXMLReader(XMLReader xmlReader)
Return anXMLReader
instance to the reader pool associated with this ContentDelivery config instance.- Specified by:
returnXMLReader
in interfaceReaderPool
- Parameters:
xmlReader
- The XMLReader instance to be returned. If the pool is full, the pool is re-sized to accommodate the new reader.
-
getProperties
public Map<String,String> getProperties()
Description copied from interface:ReaderPool
Returns implementation-specificProperties
.- Specified by:
getProperties
in interfaceReaderPool
- Returns:
- Implementation-specific
Properties
ofthis
reader pool
-
-