public class RegularReportTriggerer extends Object implements Triggerable
Reporter
instances after the given time interval. After
creation the thread has to be started. It might be stopped and restarted.
Note, that the used thread is a deamon thread.Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOGGER |
private Reporter[] |
reporters
Array of reporters that are triggered.
|
private long |
timeInterval
Time interval at which the next reporting is triggered.
|
private RegularTriggerer |
triggerer
RegularTriggerer that is used to trigger the reporting in
parallel to the running program. |
private Semaphore |
triggererMutex
Mutex to manage the access to the
triggerer instance. |
Constructor and Description |
---|
RegularReportTriggerer(long timeInterval,
Reporter... reporters)
Constructor.
|
private static final org.slf4j.Logger LOGGER
private long timeInterval
private Semaphore triggererMutex
triggerer
instance.private RegularTriggerer triggerer
RegularTriggerer
that is used to trigger the reporting in
parallel to the running program.private Reporter[] reporters
public RegularReportTriggerer(long timeInterval, Reporter... reporters)
timeInterval
- Time interval at which the next reporting is triggered.reporters
- Array of reporters that are triggered.public void start()
public void stop()
public void trigger()
trigger
in interface Triggerable
Copyright © 2015. All rights reserved.