Class BaseGenericObjectPool.Evictor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ScheduledFuture<?> scheduledFuture  
    • Constructor Summary

      Constructors 
      Constructor Description
      Evictor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void cancel()
      Cancels the scheduled future.
      void run()
      Run pool maintenance.
      (package private) void setScheduledFuture​(java.util.concurrent.ScheduledFuture<?> scheduledFuture)
      Sets the scheduled future.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scheduledFuture

        private java.util.concurrent.ScheduledFuture<?> scheduledFuture
    • Constructor Detail

      • Evictor

        Evictor()
    • Method Detail

      • run

        public void run()
        Run pool maintenance. Evict objects qualifying for eviction and then ensure that the minimum number of idle instances are available. Since the Timer that invokes Evictors is shared for all Pools but pools may exist in different class loaders, the Evictor ensures that any actions taken are under the class loader of the factory associated with the pool.
        Specified by:
        run in interface java.lang.Runnable
      • setScheduledFuture

        void setScheduledFuture​(java.util.concurrent.ScheduledFuture<?> scheduledFuture)
        Sets the scheduled future.
        Parameters:
        scheduledFuture - the scheduled future.
      • cancel

        void cancel()
        Cancels the scheduled future.