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 XMLReaderborrowXMLReader()Gets anXMLReaderinstance from the reader pool associated with this ContentDelivery config instance.Map<String,String>getProperties()Returns implementation-specificProperties.voidreturnXMLReader(XMLReader xmlReader)Return anXMLReaderinstance to the reader pool associated with this ContentDelivery config instance.
-
-
-
Method Detail
-
borrowXMLReader
public XMLReader borrowXMLReader()
Description copied from interface:ReaderPoolGets anXMLReaderinstance from the reader pool associated with this ContentDelivery config instance.- Specified by:
borrowXMLReaderin interfaceReaderPool- Returns:
- An XMLReader instance if the pool is not empty, otherwise null
-
returnXMLReader
public void returnXMLReader(XMLReader xmlReader)
Return anXMLReaderinstance to the reader pool associated with this ContentDelivery config instance.- Specified by:
returnXMLReaderin 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:ReaderPoolReturns implementation-specificProperties.- Specified by:
getPropertiesin interfaceReaderPool- Returns:
- Implementation-specific
Propertiesofthisreader pool
-
-