Class PooledTaskFactory

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.camel.support.PooledObjectFactorySupport

        org.apache.camel.support.PooledObjectFactorySupport.UtilizationStatistics
      • Nested classes/interfaces inherited from interface org.apache.camel.spi.PooledObjectFactory

        org.apache.camel.spi.PooledObjectFactory.Statistics
    • Field Summary

      • Fields inherited from class org.apache.camel.support.PooledObjectFactorySupport

        camelContext, capacity, pool, source, statistics, statisticsEnabled
      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PooledExchangeTask acquire()  
      PooledExchangeTask acquire​(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
      Attempts to acquire a pooled task to use for processing the exchange, if not possible then a new task is created.
      boolean release​(PooledExchangeTask task)
      Releases the task after its done being used
      String toString()  
      • Methods inherited from class org.apache.camel.support.PooledObjectFactorySupport

        doBuild, doShutdown, getCamelContext, getCapacity, getSize, getStatistics, isPooled, isStatisticsEnabled, purge, resetStatistics, setCamelContext, setCapacity, setStatisticsEnabled
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doFail, doInit, doLifecycleChange, doResume, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.CamelContextAware

        getCamelContext, setCamelContext
      • Methods inherited from interface org.apache.camel.spi.PooledObjectFactory

        getCapacity, getSize, getStatistics, isPooled, isStatisticsEnabled, purge, resetStatistics, setCapacity, setStatisticsEnabled
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • PooledTaskFactory

        public PooledTaskFactory()
      • PooledTaskFactory

        public PooledTaskFactory​(Object source)
    • Method Detail

      • acquire

        public PooledExchangeTask acquire​(org.apache.camel.Exchange exchange,
                                          org.apache.camel.AsyncCallback callback)
        Description copied from interface: PooledExchangeTaskFactory
        Attempts to acquire a pooled task to use for processing the exchange, if not possible then a new task is created.
        Specified by:
        acquire in interface PooledExchangeTaskFactory
        Parameters:
        exchange - the current exchange
        callback - the callback for the exchange
        Returns:
        the task
      • release

        public boolean release​(PooledExchangeTask task)
        Description copied from interface: PooledExchangeTaskFactory
        Releases the task after its done being used
        Specified by:
        release in interface PooledExchangeTaskFactory
        Specified by:
        release in interface org.apache.camel.spi.PooledObjectFactory<PooledExchangeTask>
        Parameters:
        task - the task
        Returns:
        true if the task was released, and false if the task failed to be released or no space in pool, and the task was discarded.