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 final void init()
AbstractController
init
in class AbstractController
protected final void cleanup()
AbstractController
cleanup
in class AbstractController
public final java.lang.String toString()
toString
in class AbstractController
public final 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 final boolean removeScheduledSampler(ScheduledSamplerJob sensorJob)
ScheduledSamplerJob
.removeScheduledSampler
in interface ISamplingController
sensorJob
- The sampler to be removed.Copyright 2020 Kieker Project, http://kieker-monitoring.net