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 newScheduledSamplerJob
with the given parameters. -
Method Summary
-
Constructor Details
-
ScheduledSamplerJob
Constructs a newScheduledSamplerJob
with the given parameters.- Parameters:
monitoringController
- used to log the sampled data (represented asIMonitoringRecord
s) viaIWriterController.newMonitoringRecord(kieker.common.record.IMonitoringRecord)
.sensor
- sampler to be trigger viaISampler.sample(IMonitoringController)
-
-
Method Details
-
run
public final void run()Throws aRuntimeException
if an error occurred.- Specified by:
run
in 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
ScheduledFuture
which allows to cancel future executions of thisScheduledSamplerJob
.
-