Interface IWriterController

All Superinterfaces:
IMonitoringRecordReceiver
All Known Subinterfaces:
IMonitoringController
All Known Implementing Classes:
MonitoringController, WriterController

public interface IWriterController
extends IMonitoringRecordReceiver
The methods must not throw any exceptions but indicate problems via its respective return value.
Since:
1.3
Author:
Andre van Hoorn, Jan Waller, Robert von Massow
  • Method Summary

    Modifier and Type Method Description
    boolean newMonitoringRecord​(IMonitoringRecord record)
    Called for each new record to write it out to the pre-configured target (e.g., file system, database, or messaging queue).
    void waitForTermination​(long timeoutInMs)
    Waits for the termination of the monitoring controller.
  • Method Details

    • newMonitoringRecord

      boolean newMonitoringRecord​(IMonitoringRecord record)

      Called for each new record to write it out to the pre-configured target (e.g., file system, database, or messaging queue). This method could invoke the given record's methods declared in IMonitoringRecord and thus alter its loggingTimestamp property.

      Notice, that this method should not throw an exception, but indicate an error by the return value false.

      Specified by:
      newMonitoringRecord in interface IMonitoringRecordReceiver
      Parameters:
      record - the record.
      Returns:
      true on success; false in case of an error.
      Since:
      1.3
    • waitForTermination

      void waitForTermination​(long timeoutInMs) throws java.lang.InterruptedException
      Waits for the termination of the monitoring controller. The termination must be previously triggered by MonitoringController.terminateMonitoring().
      Parameters:
      timeoutInMs - timeout in milliseconds to wait (a timeout of 0 means to wait forever)
      Throws:
      java.lang.InterruptedException - if the calling thread was interrupted while waiting for the termination
      Since:
      1.13