Class SweeperPool.Sweeper

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    SweeperPool

    private static class SweeperPool.Sweeper
    extends java.lang.Object
    implements java.lang.Runnable
    Periodically at sweepInterval goes through and tests if the pool should be trimmed.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sweeper​(SweeperPool pool, int sweepInterval)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void debug​(java.lang.String msg)  
      (package private) boolean hasStopped()  
      (package private) void join()  
      void run()
      Run the sweeper.
      private void runSweep()  
      void start()  
      void stop()  
      • Methods inherited from class java.lang.Object

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

      • service

        private transient boolean service
      • sweepInterval

        private final transient int sweepInterval
      • t

        private transient java.lang.Thread t
    • Constructor Detail

      • Sweeper

        public Sweeper​(SweeperPool pool,
                       int sweepInterval)
    • Method Detail

      • run

        public void run()
        Run the sweeper.
        Specified by:
        run in interface java.lang.Runnable
        See Also:
        Runnable.run()
      • start

        public void start()
      • stop

        public void stop()
      • join

        void join()
           throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • hasStopped

        boolean hasStopped()
      • debug

        private final void debug​(java.lang.String msg)
      • runSweep

        private void runSweep()