public final class RegistryRecord extends AbstractMonitoringRecord implements IMonitoringRecord.Factory, IMonitoringRecord.BinaryFactory
IMonitoringRecord.BinaryFactory, IMonitoringRecord.Factory
Modifier and Type | Field and Description |
---|---|
static int |
CLASS_ID |
static java.lang.String |
ENCODING |
static int |
SIZE |
static java.lang.Class<?>[] |
TYPES |
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 and Description |
---|
RegistryRecord(int id,
java.lang.String string)
Creates a new instance of this class using the given parameters.
|
RegistryRecord(IValueDeserializer deserializer)
This constructor converts the given array into a record.
|
RegistryRecord(java.lang.Object[] values)
This constructor converts the given array into a record.
|
Modifier and Type | Method and Description |
---|---|
int |
getId() |
int |
getSize()
This method should deliver the size of a binary representation of this record.
|
byte[] |
getStrBytes() |
java.lang.String |
getString() |
java.lang.String[] |
getValueNames()
This method delivers an array containing the value names of the record.
|
java.lang.Class<?>[] |
getValueTypes()
This method delivers 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. |
static void |
registerRecordInRegistry(java.nio.ByteBuffer buffer,
ILookup<java.lang.String> stringRegistry)
Static function used to register strings stored in a byte buffer as string in the string registry with the proper id.
|
void |
registerStrings(IRegistry<java.lang.String> stringRegistry)
Registers the string attributes of the record at the given
stringRegistry . |
void |
serialize(IValueSerializer serializer)
This method serializes this record using the given serializer.
|
java.lang.Object[] |
toArray()
This method should deliver an array containing the content of the record.
|
checkArray, classForName, compareTo, createFromArray, createFromArray, createFromDeserializer, createFromStringArray, equals, fromStringArrayToTypedArray, getLoggingTimestamp, hashCode, isNotEqual, isNotEqual, setLoggingTimestamp, toString, typesForClass
public static final int SIZE
public static final java.lang.Class<?>[] TYPES
public static final java.lang.String ENCODING
public static final int CLASS_ID
public RegistryRecord(int id, java.lang.String string)
id
- The ID.string
- The string.public RegistryRecord(java.lang.Object[] values)
toArray()
.values
- The values for the record.public RegistryRecord(IValueDeserializer deserializer) throws java.nio.BufferUnderflowException
deserializer
- The deserializer to decode the record with.java.nio.BufferUnderflowException
- if buffer not sufficientpublic java.lang.Object[] toArray()
toArray
in interface IMonitoringRecord
public void registerStrings(IRegistry<java.lang.String> stringRegistry)
stringRegistry
.registerStrings
in interface IMonitoringRecord
public void serialize(IValueSerializer serializer) throws java.nio.BufferOverflowException
serialize
in interface IMonitoringRecord
serializer
- The serializer to serialize the record with. *java.nio.BufferOverflowException
- If the underlying buffer has insufficient capacity to store this record@Deprecated public final void initFromArray(java.lang.Object[] values)
IMonitoringRecord.Factory
mechanism. Hence, this method is not implemented.IMonitoringRecord.toArray()
.initFromArray
in interface IMonitoringRecord
values
- The values for the record.public java.lang.Class<?>[] getValueTypes()
getValueTypes
in interface IMonitoringRecord
IMonitoringRecord.toArray()
public java.lang.String[] getValueNames()
IMonitoringRecord
getValueNames
in interface IMonitoringRecord
IMonitoringRecord.toArray()
public int getSize()
getSize
in interface IMonitoringRecord
public final byte[] getStrBytes()
public final int getId()
public final java.lang.String getString()
public static final void registerRecordInRegistry(java.nio.ByteBuffer buffer, ILookup<java.lang.String> stringRegistry) throws java.nio.BufferOverflowException
buffer
- the byte buffer containing the stringstringRegistry
- the registry where the string is storedjava.nio.BufferOverflowException
- if the length encoded in the buffer exceeds the buffers boundaryCopyright 2017 Kieker Project, http://kieker-monitoring.net