Kieker 1.12

kieker.common.record
Interface IMonitoringRecord

All Superinterfaces:
java.lang.Comparable<IMonitoringRecord>, java.io.Serializable
All Known Subinterfaces:
ICallObjectRecord, ICallRecord, IClassSignature, IConstructorRecord, IEventRecord, IExceptionRecord, IFlowRecord, IInterfaceRecord, IObjectRecord, IOperationRecord, IOperationSignature, ITraceRecord
All Known Implementing Classes:
AbstractEvent, AbstractJVMRecord, AbstractMonitorEvent, AbstractMonitoringRecord, AbstractOperationEvent, AbstractTraceEvent, AfterConstructorEvent, AfterConstructorFailedEvent, AfterConstructorFailedObjectEvent, AfterConstructorObjectEvent, AfterOperationEvent, AfterOperationFailedEvent, AfterOperationFailedObjectEvent, AfterOperationObjectEvent, AggregationWindow, BeforeConstructorEvent, BeforeConstructorObjectEvent, BeforeConstructorObjectInterfaceEvent, BeforeOperationEvent, BeforeOperationObjectEvent, BeforeOperationObjectInterfaceEvent, BranchingRecord, CallConstructorEvent, CallConstructorObjectEvent, CallOperationEvent, CallOperationObjectEvent, ClassLoadingRecord, CompilationRecord, ConstructionEvent, CPUUtilizationRecord, DiskUsageRecord, EmptyRecord, ExtendedStorableDetectionResult, GCRecord, JoinEvent, KiekerMetadataRecord, LoadAverageRecord, MemoryRecord, MemSwapUsageRecord, MonitorEntryEvent, MonitorExitEvent, MonitorNotifyAllEvent, MonitorNotifyEvent, MonitorRequestEvent, MonitorWaitEvent, NamedDoubleRecord, NamedTSPoint, NetworkUtilizationRecord, OperationExecutionRecord, RegistryRecord, ResourceUtilizationRecord, SplitEvent, StorableDetectionResult, ThreadsStatusRecord, TimestampRecord, TraceMetadata, UptimeRecord

public interface IMonitoringRecord
extends java.io.Serializable, java.lang.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.
 java.lang.Class<?>[] getValueTypes()
          This method should deliver an array with the classes of the single values for the record.
 void initFromArray(java.lang.Object[] values)
          This method should initialize the record based on the given values.
 void initFromBytes(java.nio.ByteBuffer buffer, IRegistry<java.lang.String> stringRegistry)
          This method should initialize the record based on the given values.
 void registerStrings(IRegistry<java.lang.String> stringRegistry)
          Registers the string attributes of the record at the given stringRegistry.
 void setLoggingTimestamp(long timestamp)
          Sets the logging timestamp to a new value.
 java.lang.Object[] toArray()
          This method should deliver an array containing the content of the record.
 java.lang.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(java.nio.ByteBuffer buffer, IRegistry<java.lang.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

java.lang.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 java.lang.Object
Returns:
A (human readable) string of this record.
Since:
1.5

toArray

java.lang.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

registerStrings

void registerStrings(IRegistry<java.lang.String> stringRegistry)
Registers the string attributes of the record at the given stringRegistry.

Since:
1.11

writeBytes

void writeBytes(java.nio.ByteBuffer buffer,
                IRegistry<java.lang.String> stringRegistry)
                throws java.nio.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:
java.nio.BufferOverflowException - if buffer not sufficient
Since:
1.8

initFromBytes

void initFromBytes(java.nio.ByteBuffer buffer,
                   IRegistry<java.lang.String> stringRegistry)
                   throws java.nio.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:
java.nio.BufferUnderflowException - if buffer not sufficient
Since:
1.8

initFromArray

void initFromArray(java.lang.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

java.lang.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.12

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