Package org.smooks.engine.delivery
Class DefaultReaderPool
- java.lang.Object
-
- org.smooks.engine.delivery.DefaultReaderPool
-
- All Implemented Interfaces:
ReaderPool
public class DefaultReaderPool extends Object implements ReaderPool
-
-
Constructor Summary
Constructors Constructor Description DefaultReaderPool(int maxReaderPoolSize)
-
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.int
getMaxReaderPoolSize()
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 instance is left to the GC (i.e. lost).
-
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
-
getMaxReaderPoolSize
public int getMaxReaderPoolSize()
-
-