Package kieker.monitoring.core.sampler
Class ScheduledSamplerJob
java.lang.Object
kieker.monitoring.core.sampler.ScheduledSamplerJob
- All Implemented Interfaces:
java.lang.Runnable
public class ScheduledSamplerJob
extends java.lang.Object
implements java.lang.Runnable
- Since:
- 1.3
- Author:
- Andre van Hoorn
-
Constructor Summary
Constructors Constructor Description ScheduledSamplerJob(IMonitoringController monitoringController, ISampler sensor)Constructs a newScheduledSamplerJobwith the given parameters. -
Method Summary
-
Constructor Details
-
ScheduledSamplerJob
Constructs a newScheduledSamplerJobwith the given parameters.- Parameters:
monitoringController- used to log the sampled data (represented asIMonitoringRecords) viaIWriterController.newMonitoringRecord(kieker.common.record.IMonitoringRecord).sensor- sampler to be trigger viaISampler.sample(IMonitoringController)
-
-
Method Details
-
run
public final void run()Throws aRuntimeExceptionif an error occurred.- Specified by:
runin interfacejava.lang.Runnable- Throws:
java.lang.RuntimeException- when sampling fails.
-
setFuture
public void setFuture(java.util.concurrent.ScheduledFuture<?> future)- Parameters:
future- The new future object.
-
getFuture
public java.util.concurrent.ScheduledFuture<?> getFuture()- Returns:
- the
ScheduledFuturewhich allows to cancel future executions of thisScheduledSamplerJob.
-