Class SamplingController
java.lang.Object
kieker.monitoring.core.controller.AbstractController
kieker.monitoring.core.controller.SamplingController
- All Implemented Interfaces:
ISamplingController
public final class SamplingController extends AbstractController implements ISamplingController
- Since:
- 1.3
- Author:
- Andre van Hoorn, Jan Waller
-
Field Summary
Fields inherited from class kieker.monitoring.core.controller.AbstractController
monitoringController -
Constructor Summary
Constructors Modifier Constructor Description protectedSamplingController(Configuration configuration)Creates a new instance of this class using the given configuration to initialize the class. -
Method Summary
Modifier and Type Method Description protected voidcleanup()This method should clean up.protected voidinit()This method should to the initialization work.booleanremoveScheduledSampler(ScheduledSamplerJob sensorJob)Stops future executions of the given periodicScheduledSamplerJob.ScheduledSamplerJobschedulePeriodicSampler(ISampler sensor, long initialDelay, long period, java.util.concurrent.TimeUnit timeUnit)Schedules the givenISamplerwith given initial delay, and period.java.lang.StringtoString()Methods inherited from class kieker.monitoring.core.controller.AbstractController
createAndInitialize, isTerminated, setMonitoringController, terminate
-
Constructor Details
-
SamplingController
Creates a new instance of this class using the given configuration to initialize the class.- Parameters:
configuration- The configuration used to initialize this controller.
-
-
Method Details
-
init
protected void init()Description copied from class:AbstractControllerThis method should to the initialization work.- Specified by:
initin classAbstractController
-
cleanup
protected void cleanup()Description copied from class:AbstractControllerThis method should clean up.- Specified by:
cleanupin classAbstractController
-
toString
public java.lang.String toString()- Specified by:
toStringin classAbstractController
-
schedulePeriodicSampler
public ScheduledSamplerJob schedulePeriodicSampler(ISampler sensor, long initialDelay, long period, java.util.concurrent.TimeUnit timeUnit)Schedules the givenISamplerwith given initial delay, and period.- Specified by:
schedulePeriodicSamplerin interfaceISamplingController- Parameters:
sensor- The sampler to schedule.initialDelay- The initial delay.period- The period.timeUnit- The time unit which determines how to interpret the given parameter.- Returns:
- a
ScheduledSamplerJobas a handler for removing the scheduled sampler later on by using the methodISamplingController.removeScheduledSampler(ScheduledSamplerJob).
-
removeScheduledSampler
Stops future executions of the given periodicScheduledSamplerJob.- Specified by:
removeScheduledSamplerin interfaceISamplingController- Parameters:
sensorJob- The sampler to be removed.- Returns:
- true if the sensor is not registered
-