Class 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 Detail

      • DynamicReaderPool

        public DynamicReaderPool()
    • Method Detail

      • borrowXMLReader

        public XMLReader borrowXMLReader()
        Description copied from interface: ReaderPool
        Gets an XMLReader instance from the reader pool associated with this ContentDelivery config instance.
        Specified by:
        borrowXMLReader in interface ReaderPool
        Returns:
        An XMLReader instance if the pool is not empty, otherwise null
      • returnXMLReader

        public void returnXMLReader​(XMLReader xmlReader)
        Return an XMLReader instance to the reader pool associated with this ContentDelivery config instance.
        Specified by:
        returnXMLReader in interface ReaderPool
        Parameters:
        xmlReader - The XMLReader instance to be returned. If the pool is full, the pool is re-sized to accommodate the new reader.