Kieker 1.12

kieker.common.record.system
Class NetworkUtilizationRecord

java.lang.Object
  extended by kieker.common.record.AbstractMonitoringRecord
      extended by kieker.common.record.system.NetworkUtilizationRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IMonitoringRecord>, IMonitoringRecord, IMonitoringRecord.BinaryFactory, IMonitoringRecord.Factory

public class NetworkUtilizationRecord
extends AbstractMonitoringRecord
implements IMonitoringRecord.Factory, IMonitoringRecord.BinaryFactory

Since:
1.12
Author:
Teerat Pitakrat
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface kieker.common.record.IMonitoringRecord
IMonitoringRecord.BinaryFactory, IMonitoringRecord.Factory
 
Field Summary
static java.lang.String HOSTNAME
           
static java.lang.String INTERFACE_NAME
           
static double RX_BYTES_PER_SECOND
           
static double RX_DROPPED_PER_SECOND
           
static double RX_ERRORS_PER_SECOND
           
static double RX_FRAME_PER_SECOND
           
static double RX_OVERRUNS_PER_SECOND
           
static double RX_PACKETS_PER_SECOND
           
static int SIZE
          Descriptive definition of the serialization size of the record.
static long SPEED
           
static long TIMESTAMP
           
static double TX_BYTES_PER_SECOND
           
static double TX_CARRIER_PER_SECOND
           
static double TX_COLLISIONS_PER_SECOND
           
static double TX_DROPPED_PER_SECOND
           
static double TX_ERRORS_PER_SECOND
           
static double TX_OVERRUNS_PER_SECOND
           
static double TX_PACKETS_PER_SECOND
           
static java.lang.Class<?>[] TYPES
           
 
Fields inherited from class kieker.common.record.AbstractMonitoringRecord
TYPE_SIZE_BOOLEAN, TYPE_SIZE_BYTE, TYPE_SIZE_CHARACTER, TYPE_SIZE_DOUBLE, TYPE_SIZE_FLOAT, TYPE_SIZE_INT, TYPE_SIZE_LONG, TYPE_SIZE_SHORT, TYPE_SIZE_STRING
 
Constructor Summary
  NetworkUtilizationRecord(java.nio.ByteBuffer buffer, IRegistry<java.lang.String> stringRegistry)
          This constructor converts the given array into a record.
  NetworkUtilizationRecord(long timestamp, java.lang.String hostname, java.lang.String interfaceName, long speed, double txBytesPerSecond, double txCarrierPerSecond, double txCollisionsPerSecond, double txDroppedPerSecond, double txErrorsPerSecond, double txOverrunsPerSecond, double txPacketsPerSecond, double rxBytesPerSecond, double rxDroppedPerSecond, double rxErrorsPerSecond, double rxFramePerSecond, double rxOverrunsPerSecond, double rxPacketsPerSecond)
          Creates a new instance of this class using the given parameters.
  NetworkUtilizationRecord(java.lang.Object[] values)
          This constructor converts the given array into a record.
protected NetworkUtilizationRecord(java.lang.Object[] values, java.lang.Class<?>[] valueTypes)
          This constructor uses the given array to initialize the fields of this record.
 
Method Summary
 java.lang.String getHostname()
           
 java.lang.String getInterfaceName()
           
 double getRxBytesPerSecond()
           
 double getRxDroppedPerSecond()
           
 double getRxErrorsPerSecond()
           
 double getRxFramePerSecond()
           
 double getRxOverrunsPerSecond()
           
 double getRxPacketsPerSecond()
           
 int getSize()
          This method should deliver the size of a binary representation of this record.
 long getSpeed()
           
 long getTimestamp()
           
 double getTxBytesPerSecond()
           
 double getTxCarrierPerSecond()
           
 double getTxCollisionsPerSecond()
           
 double getTxDroppedPerSecond()
           
 double getTxErrorsPerSecond()
           
 double getTxOverrunsPerSecond()
           
 double getTxPacketsPerSecond()
           
 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)
          Deprecated. This record uses the IMonitoringRecord.Factory mechanism. Hence, this method is not implemented.
 void initFromBytes(java.nio.ByteBuffer buffer, IRegistry<java.lang.String> stringRegistry)
          Deprecated. This record uses the IMonitoringRecord.BinaryFactory mechanism. Hence, this method is not implemented.
 void registerStrings(IRegistry<java.lang.String> stringRegistry)
          Registers the string attributes of the record at the given stringRegistry.
 java.lang.Object[] toArray()
          This method should deliver an array containing the content of the record.
 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 class kieker.common.record.AbstractMonitoringRecord
checkArray, classForName, compareTo, createFromArray, createFromArray, createFromByteBuffer, createFromByteBuffer, createFromStringArray, equals, fromStringArrayToTypedArray, getLoggingTimestamp, hashCode, setLoggingTimestamp, toString, typesForClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
Descriptive definition of the serialization size of the record.

See Also:
Constant Field Values

TYPES

public static final java.lang.Class<?>[] TYPES

TIMESTAMP

public static final long TIMESTAMP
See Also:
Constant Field Values

HOSTNAME

public static final java.lang.String HOSTNAME
See Also:
Constant Field Values

INTERFACE_NAME

public static final java.lang.String INTERFACE_NAME
See Also:
Constant Field Values

SPEED

public static final long SPEED
See Also:
Constant Field Values

TX_BYTES_PER_SECOND

public static final double TX_BYTES_PER_SECOND
See Also:
Constant Field Values

TX_CARRIER_PER_SECOND

public static final double TX_CARRIER_PER_SECOND
See Also:
Constant Field Values

TX_COLLISIONS_PER_SECOND

public static final double TX_COLLISIONS_PER_SECOND
See Also:
Constant Field Values

TX_DROPPED_PER_SECOND

public static final double TX_DROPPED_PER_SECOND
See Also:
Constant Field Values

TX_ERRORS_PER_SECOND

public static final double TX_ERRORS_PER_SECOND
See Also:
Constant Field Values

TX_OVERRUNS_PER_SECOND

public static final double TX_OVERRUNS_PER_SECOND
See Also:
Constant Field Values

TX_PACKETS_PER_SECOND

public static final double TX_PACKETS_PER_SECOND
See Also:
Constant Field Values

RX_BYTES_PER_SECOND

public static final double RX_BYTES_PER_SECOND
See Also:
Constant Field Values

RX_DROPPED_PER_SECOND

public static final double RX_DROPPED_PER_SECOND
See Also:
Constant Field Values

RX_ERRORS_PER_SECOND

public static final double RX_ERRORS_PER_SECOND
See Also:
Constant Field Values

RX_FRAME_PER_SECOND

public static final double RX_FRAME_PER_SECOND
See Also:
Constant Field Values

RX_OVERRUNS_PER_SECOND

public static final double RX_OVERRUNS_PER_SECOND
See Also:
Constant Field Values

RX_PACKETS_PER_SECOND

public static final double RX_PACKETS_PER_SECOND
See Also:
Constant Field Values
Constructor Detail

NetworkUtilizationRecord

public NetworkUtilizationRecord(long timestamp,
                                java.lang.String hostname,
                                java.lang.String interfaceName,
                                long speed,
                                double txBytesPerSecond,
                                double txCarrierPerSecond,
                                double txCollisionsPerSecond,
                                double txDroppedPerSecond,
                                double txErrorsPerSecond,
                                double txOverrunsPerSecond,
                                double txPacketsPerSecond,
                                double rxBytesPerSecond,
                                double rxDroppedPerSecond,
                                double rxErrorsPerSecond,
                                double rxFramePerSecond,
                                double rxOverrunsPerSecond,
                                double rxPacketsPerSecond)
Creates a new instance of this class using the given parameters.

Parameters:
timestamp - timestamp
hostname - hostname
interfaceName - interfaceName
speed - speed
txBytesPerSecond - txBytesPerSecond
txCarrierPerSecond - txCarrierPerSecond
txCollisionsPerSecond - txCollisionsPerSecond
txDroppedPerSecond - txDroppedPerSecond
txErrorsPerSecond - txErrorsPerSecond
txOverrunsPerSecond - txOverrunsPerSecond
txPacketsPerSecond - txPacketsPerSecond
rxBytesPerSecond - rxBytesPerSecond
rxDroppedPerSecond - rxDroppedPerSecond
rxErrorsPerSecond - rxErrorsPerSecond
rxFramePerSecond - rxFramePerSecond
rxOverrunsPerSecond - rxOverrunsPerSecond
rxPacketsPerSecond - rxPacketsPerSecond

NetworkUtilizationRecord

public NetworkUtilizationRecord(java.lang.Object[] values)
This constructor converts the given array into a record. It is recommended to use the array which is the result of a call to toArray().

Parameters:
values - The values for the record.

NetworkUtilizationRecord

protected NetworkUtilizationRecord(java.lang.Object[] values,
                                   java.lang.Class<?>[] valueTypes)
This constructor uses the given array to initialize the fields of this record.

Parameters:
values - The values for the record.
valueTypes - The types of the elements in the first array.

NetworkUtilizationRecord

public NetworkUtilizationRecord(java.nio.ByteBuffer buffer,
                                IRegistry<java.lang.String> stringRegistry)
                         throws java.nio.BufferUnderflowException
This constructor converts the given array into a record.

Parameters:
buffer - The bytes for the record.
Throws:
java.nio.BufferUnderflowException - if buffer not sufficient
Method Detail

toArray

public 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.

Specified by:
toArray in interface IMonitoringRecord
Returns:
An array with the values of the record.

registerStrings

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

Specified by:
registerStrings in interface IMonitoringRecord
Overrides:
registerStrings in class AbstractMonitoringRecord

writeBytes

public 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.

Specified by:
writeBytes in interface IMonitoringRecord
Parameters:
buffer - The used ByteBuffer with sufficient capacity
stringRegistry - Usually the associated MonitoringController
Throws:
java.nio.BufferOverflowException - if buffer not sufficient

getValueTypes

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

Specified by:
getValueTypes in interface IMonitoringRecord
Returns:
The types of the values. This returned array should be treated readonly.
See Also:
IMonitoringRecord.toArray()

getSize

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

Specified by:
getSize in interface IMonitoringRecord
Returns:
The size.

initFromArray

@Deprecated
public void initFromArray(java.lang.Object[] values)
Deprecated. This record uses the IMonitoringRecord.Factory mechanism. Hence, this method is not implemented.

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

Specified by:
initFromArray in interface IMonitoringRecord
Parameters:
values - The values for the record.

initFromBytes

@Deprecated
public void initFromBytes(java.nio.ByteBuffer buffer,
                                     IRegistry<java.lang.String> stringRegistry)
                   throws java.nio.BufferUnderflowException
Deprecated. This record uses the IMonitoringRecord.BinaryFactory mechanism. Hence, this method is not implemented.

This method should initialize the record based on the given values. The array should be one of those resulting from a call to IMonitoringRecord.writeBytes(ByteBuffer, IRegistry).

Specified by:
initFromBytes in interface IMonitoringRecord
Parameters:
buffer - The bytes for the record.
stringRegistry - The Registry storing the strings.
Throws:
java.nio.BufferUnderflowException - if buffer not sufficient

getTimestamp

public final long getTimestamp()

getHostname

public final java.lang.String getHostname()

getInterfaceName

public final java.lang.String getInterfaceName()

getSpeed

public final long getSpeed()

getTxBytesPerSecond

public final double getTxBytesPerSecond()

getTxCarrierPerSecond

public final double getTxCarrierPerSecond()

getTxCollisionsPerSecond

public final double getTxCollisionsPerSecond()

getTxDroppedPerSecond

public final double getTxDroppedPerSecond()

getTxErrorsPerSecond

public final double getTxErrorsPerSecond()

getTxOverrunsPerSecond

public final double getTxOverrunsPerSecond()

getTxPacketsPerSecond

public final double getTxPacketsPerSecond()

getRxBytesPerSecond

public final double getRxBytesPerSecond()

getRxDroppedPerSecond

public final double getRxDroppedPerSecond()

getRxErrorsPerSecond

public final double getRxErrorsPerSecond()

getRxFramePerSecond

public final double getRxFramePerSecond()

getRxOverrunsPerSecond

public final double getRxOverrunsPerSecond()

getRxPacketsPerSecond

public final double getRxPacketsPerSecond()

Kieker 1.12

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