public final class SamplingController extends AbstractController implements ISamplingController
monitoringController
Modifier | Constructor and Description |
---|---|
protected |
SamplingController(Configuration configuration)
Creates a new instance of this class using the given configuration to initialize the class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
This method should clean up.
|
protected void |
init()
This method should to the initialization work.
|
boolean |
removeScheduledSampler(ScheduledSamplerJob sensorJob)
Stops future executions of the given periodic
ScheduledSamplerJob . |
ScheduledSamplerJob |
schedulePeriodicSampler(ISampler sensor,
long initialDelay,
long period,
java.util.concurrent.TimeUnit timeUnit)
Schedules the given
ISampler with given initial delay, and period. |
java.lang.String |
toString() |
createAndInitialize, isTerminated, setMonitoringController, terminate
protected SamplingController(Configuration configuration)
configuration
- The configuration used to initialize this controller.protected void init()
AbstractController
init
in class AbstractController
protected void cleanup()
AbstractController
cleanup
in class AbstractController
public java.lang.String toString()
toString
in class AbstractController
public ScheduledSamplerJob schedulePeriodicSampler(ISampler sensor, long initialDelay, long period, java.util.concurrent.TimeUnit timeUnit)
ISampler
with given initial delay, and period.schedulePeriodicSampler
in interface ISamplingController
sensor
- The sampler to schedule.initialDelay
- The initial delay.period
- The period.timeUnit
- The time unit which determines how to interpret the given parameter.ScheduledSamplerJob
as a handler for removing the scheduled sampler later on by using the method
ISamplingController.removeScheduledSampler(ScheduledSamplerJob)
.public boolean removeScheduledSampler(ScheduledSamplerJob sensorJob)
ScheduledSamplerJob
.removeScheduledSampler
in interface ISamplingController
sensorJob
- The sampler to be removed.Copyright 2021 Kieker Project, http://kieker-monitoring.net