Package org.codehaus.plexus.util
Class SweeperPool.Sweeper
- java.lang.Object
-
- org.codehaus.plexus.util.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 atsweepInterval
goes through and tests if the pool should be trimmed.
-
-
Field Summary
Fields Modifier and Type Field Description private SweeperPool
pool
private boolean
service
private int
sweepInterval
private java.lang.Thread
t
-
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()
-
-
-
Field Detail
-
pool
private final transient SweeperPool pool
-
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 interfacejava.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()
-
-