Kieker 1.3

kieker.tools.currentTimeEventGenerator
Class CurrentTimeEventGenerator

java.lang.Object
  extended by kieker.tools.currentTimeEventGenerator.CurrentTimeEventGenerator

public class CurrentTimeEventGenerator
extends Object

Generates time events with a given resolution based on the timestamps of incoming IMonitoringRecords.

  1. The first record received via #newMonitoringRecord(IMonitoringRecord) immediately leads to a new TimestampEvent with the timestamp IMonitoringRecord#getLoggingTimestamp()
  2. The timestamp of the first record is stored as firstTimestamp and future events are generated at firstTimestamp + i * timerResolution.
  3. Future IMonitoringRecord may lead to future TimestampEvent as follows:
    1. A newly incoming IMonitoringRecord with logging timestamp tstamp leads to the new timer events satisfying firstTimestamp + i * timerResolution < tstamp.
It is guaranteed that the generated timestamps are in ascending order.

Author:
Andre van Hoorn

Constructor Summary
CurrentTimeEventGenerator(long timeResolution)
          Creates an event generator which generates time events with the given resolution in nanoseconds via the output port getCurrentTimeOutputPort().
 
Method Summary
 OutputPort<TimestampEvent> getCurrentTimeOutputPort()
           
 void newTimestamp(long timestamp)
          Evaluates the given timestamp internal current time which may lead to newly generated events via getCurrentTimeOutputPort().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentTimeEventGenerator

public CurrentTimeEventGenerator(long timeResolution)
Creates an event generator which generates time events with the given resolution in nanoseconds via the output port getCurrentTimeOutputPort().

Parameters:
timeResolution -
Method Detail

newTimestamp

public void newTimestamp(long timestamp)
Evaluates the given timestamp internal current time which may lead to newly generated events via getCurrentTimeOutputPort().


getCurrentTimeOutputPort

public OutputPort<TimestampEvent> getCurrentTimeOutputPort()

Kieker 1.3

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net