Kieker 1.9

kieker.common.record
Interface IMonitoringRecord

All Superinterfaces:
Comparable<IMonitoringRecord>, Serializable
All Known Subinterfaces:
ICallObjectRecord, ICallRecord, IConstructorRecord, IEventRecord, IExceptionRecord, IFlowRecord, IObjectRecord, IOperationRecord, ITraceRecord
All Known Implementing Classes:
AbstractEvent, AbstractMonitorEvent, AbstractMonitoringRecord, AbstractOperationEvent, AbstractTraceEvent, AfterConstructorEvent, AfterConstructorFailedEvent, AfterOperationEvent, AfterOperationFailedEvent, AfterOperationFailedObjectEvent, AfterOperationObjectEvent, BeforeConstructorEvent, BeforeOperationEvent, BeforeOperationObjectEvent, BranchingRecord, CallConstructorEvent, CallOperationEvent, CallOperationObjectEvent, ConstructionEvent, CPUUtilizationRecord, EmptyRecord, JoinEvent, KiekerMetadataRecord, MemSwapUsageRecord, MonitorEntryEvent, MonitorExitEvent, MonitorNotifyAllEvent, MonitorNotifyEvent, MonitorRequestEvent, MonitorWaitEvent, NamedDoubleRecord, NamedTSPoint, OperationExecutionRecord, RegistryRecord, ResourceUtilizationRecord, SplitEvent, StorableDetectionResult, TimestampRecord, TraceMetadata

public interface IMonitoringRecord
extends Serializable, Comparable<IMonitoringRecord>

All Kieker monitoring records have to implement this minimal interface.

Warning: Objects within records should not contain ';', '\n', or '\r' in their respective toString() representation.

Since:
1.2
Author:
Andre van Hoorn, Jan Waller
See Also:
IMonitoringRecord.Factory

Nested Class Summary
static interface IMonitoringRecord.BinaryFactory
          Any record that implements this interface has to conform to certain specifications.
static interface IMonitoringRecord.Factory
          Any record that implements this interface has to conform to certain specifications.
 
Method Summary
 long getLoggingTimestamp()
          Delivers the current timestamp of the record.
 int getSize()
          This method should deliver the size of a binary representation of this record.
 Class<?>[] getValueTypes()
          This method should deliver an array with the classes of the single values for the record.
 void initFromArray(Object[] values)
          This method should initialize the record based on the given values.
 void initFromBytes(ByteBuffer buffer, IRegistry<String> stringRegistry)
          This method should initialize the record based on the given values.
 void setLoggingTimestamp(long timestamp)
          Sets the logging timestamp to a new value.
 Object[] toArray()
          This method should deliver an array containing the content of the record.
 String toString()
          Creates a string representation of this record.

This method should not be used for serialization purposes since this is not the purpose of Object's toString method.
 void writeBytes(ByteBuffer buffer, IRegistry<String> stringRegistry)
          This method should deliver an byte array containing the content of the record.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getLoggingTimestamp

long getLoggingTimestamp()
Delivers the current timestamp of the record.

Returns:
The timestamp.
Since:
1.2

setLoggingTimestamp

void setLoggingTimestamp(long timestamp)
Sets the logging timestamp to a new value.

Parameters:
timestamp - The new timestamp for the record.
Since:
1.2

toString

String toString()
Creates a string representation of this record.

This method should not be used for serialization purposes since this is not the purpose of Object's toString method.

Overrides:
toString in class Object
Returns:
A (human readable) string of this record.
Since:
1.5

toArray

Object[] toArray()
This method should deliver an array containing the content of the record. It should be possible to convert this array later into a record again.

Returns:
An array with the values of the record.
Since:
1.2

writeBytes

void writeBytes(ByteBuffer buffer,
                IRegistry<String> stringRegistry)
                throws BufferOverflowException
This method should deliver an byte array containing the content of the record. It should be possible to convert this array later into a record again.

Parameters:
buffer - The used ByteBuffer with sufficient capacity
stringRegistry - Usually the associated MonitoringController
Throws:
BufferOverflowException - if buffer not sufficient
Since:
1.8

initFromBytes

void initFromBytes(ByteBuffer buffer,
                   IRegistry<String> stringRegistry)
                   throws BufferUnderflowException
This method should initialize the record based on the given values. The array should be one of those resulting from a call to writeBytes(ByteBuffer, IRegistry).

Parameters:
buffer - The bytes for the record.
stringRegistry - The Registry storing the strings.
Throws:
BufferUnderflowException - if buffer not sufficient
Since:
1.8

initFromArray

void initFromArray(Object[] values)
This method should initialize the record based on the given values. The array should be one of those resulting from a call to toArray().

Parameters:
values - The values for the record.
Since:
1.2

getValueTypes

Class<?>[] getValueTypes()
This method should deliver an array with the classes of the single values for the record.

Returns:
The types of the values. This returned array should be treated readonly.
Since:
1.2
See Also:
toArray()

getSize

int getSize()
This method should deliver the size of a binary representation of this record.

Returns:
The size.
Since:
1.8

Kieker 1.9

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