Kieker 1.11

kieker.monitoring.core.controller
Class WriterController

java.lang.Object
  extended by kieker.monitoring.core.controller.AbstractController
      extended by kieker.monitoring.core.controller.WriterController
All Implemented Interfaces:
IMonitoringRecordReceiver, IWriterController

public final class WriterController
extends AbstractController
implements IWriterController

Since:
1.3
Author:
Andre van Hoorn, Matthias Rohr, Jan Waller, Robert von Massow

Field Summary
 
Fields inherited from class kieker.monitoring.core.controller.AbstractController
monitoringController
 
Constructor Summary
WriterController(Configuration configuration)
          Creates a new instance of this class using the given parameters.
 
Method Summary
protected  void cleanup()
          This method should clean up.
 long getNumberOfInserts()
          Shows how many inserts have been performed since last restart of the execution environment.
protected  void init()
          This method should to the initialization work.
 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).
 java.lang.String toString()
           
 
Methods inherited from class kieker.monitoring.core.controller.AbstractController
createAndInitialize, isTerminated, setMonitoringController, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WriterController

public WriterController(Configuration configuration)
Creates a new instance of this class using the given parameters.

Parameters:
configuration - The configuration for the controller.
Method Detail

init

protected final void init()
Description copied from class: AbstractController
This method should to the initialization work.

Specified by:
init in class AbstractController

cleanup

protected final void cleanup()
Description copied from class: AbstractController
This method should clean up.

Specified by:
cleanup in class AbstractController

toString

public final java.lang.String toString()
Specified by:
toString in class AbstractController

newMonitoringRecord

public final 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
Specified by:
newMonitoringRecord in interface IWriterController
Parameters:
record - the record.
Returns:
true on success; false in case of an error.

getNumberOfInserts

public final long getNumberOfInserts()
Shows how many inserts have been performed since last restart of the execution environment.

Specified by:
getNumberOfInserts in interface IWriterController
Returns:
long

Kieker 1.11

Copyright 2015 Kieker Project, http://kieker-monitoring.net