com.partnersoft.gadgets
Class LoopingThreadManager
java.lang.Object
com.partnersoft.gadgets.LoopingThreadManager
public class LoopingThreadManager
- extends java.lang.Object
Manages a set of looping threads.
This is done internally, with a single start and stop method for the whole.
You supply Runnable objects along with a Duration to indicate how often they
should repeat. It combines those with the same Duration to reduce the
total number of threads used and presumably reduce contention for
resources that the Runnable access.
Copyright 2008 Partner Software, Inc.
- Version:
- $Id$
- Author:
- Paul Reavis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoopingThreadManager
public LoopingThreadManager()
addTask
public void addTask(Duration interval,
java.lang.Runnable runnable)
start
public void start()
stop
public void stop()