use of kieker.common.record.io.TextValueDeserializer in project iobserve-analysis by research-iobserve.
the class DatFileToRecordStage method createRecord.
private void createRecord(final ClassNameRegistry classNameRegistry) throws MappingException, MonitoringRecordException, UnknownRecordTypeException {
this.charBuffer.flip();
final char lead = this.charBuffer.get();
if (lead == '$') {
final TextValueDeserializer deserializer = TextValueDeserializer.create(this.charBuffer);
final int id = deserializer.getInt();
final String classname = classNameRegistry.get(id);
if (classname == null) {
throw new MappingException("Missing classname mapping for record type id " + "'" + id + "'");
}
final long loggingTimestamp = deserializer.getLong();
final IRecordFactory<? extends IMonitoringRecord> recordFactory = this.recordFactories.get(classname);
final IMonitoringRecord event = recordFactory.create(deserializer);
event.setLoggingTimestamp(loggingTimestamp);
this.outputPort.send(event);
this.charBuffer.clear();
}
}
Aggregations