/** * This method sends a given records directly to the output port. * * @param rec * The new record object. * @return true if and only if the record has been delivered. */ @Override public boolean newMonitoringRecord(final IMonitoringRecord rec) { return super.deliver(OUTPUT_PORT_NAME_RECORDS, rec); }
/** * This method sends a given records directly to the output port. * * @param rec * The new record object. * @return true if and only if the record has been delivered. */ @Override public boolean newMonitoringRecord(final IMonitoringRecord rec) { return super.deliver(OUTPUT_PORT_NAME_RECORDS, rec); }
@Override public void onRecordReceived(final IMonitoringRecord record) { super.deliver(OUTPUT_PORT_NAME_RECORDS, record); }
@Override public void onRecordReceived(final IMonitoringRecord record) { super.deliver(OUTPUT_PORT_NAME_RECORDS, record); }
final boolean deliverIndirect(final String outputPortName, final Object data) { // NOPMD (package visible for inner class) return super.deliver(outputPortName, data); }
final boolean deliverIndirect(final String outputPortName, final Object data) { // NOPMD (package visible for inner class) return super.deliver(outputPortName, data); }
final boolean deliverIndirect(final String outputPortName, final Object data) { // NOPMD (package visible for inner class) return super.deliver(outputPortName, data); }
final boolean deliverIndirect(final String outputPortName, final Object data) { // NOPMD (package visible for inner class) return super.deliver(outputPortName, data); }
/** * Sends the current system time as a new timestamp event. */ protected void sendTimestampEvent() { final long timestamp = super.recordsTimeUnitFromProjectContext.convert(System.nanoTime(), TimeUnit.NANOSECONDS); super.deliver(OUTPUT_PORT_NAME_TIMESTAMPS, timestamp); super.deliver(OUTPUT_PORT_NAME_TIMESTAMP_RECORDS, new TimestampRecord(timestamp)); }
/** * Sends the current system time as a new timestamp event. */ protected void sendTimestampEvent() { final long timestamp = super.recordsTimeUnitFromProjectContext.convert(System.nanoTime(), TimeUnit.NANOSECONDS); super.deliver(OUTPUT_PORT_NAME_TIMESTAMPS, timestamp); super.deliver(OUTPUT_PORT_NAME_TIMESTAMP_RECORDS, new TimestampRecord(timestamp)); }
/** * {@inheritDoc} */ @Override public boolean read() { for (final T obj : this.objects) { super.deliver(ListReader.OUTPUT_PORT_NAME, obj); } try { if (this.awaitTermination) { this.logger.info("Awaiting termination latch to count down ..."); this.terminationLatch.await(); this.logger.info("Passed termination latch"); } } catch (final InterruptedException e) { this.logger.error("Reader interrupted while awaiting termination", e); return false; } return true; }
super.deliver(OUTPUT_PORT_NAME_RECORDS, record);
readingReaders--; } else { super.deliver(OUTPUT_PORT_NAME_RECORDS, record);
readingReaders--; } else { super.deliver(OUTPUT_PORT_NAME_RECORDS, record);
private void read(final ByteBuffer buffer) { final int clazzId = buffer.getInt(); final long loggingTimestamp = buffer.getLong(); try { // NOCS (Nested try-catch) // final IMonitoringRecord record = AbstractMonitoringRecord.createFromByteBuffer(clazzid, buffer, this.stringRegistry); final String recordClassName = this.stringRegistry.get(clazzId); final IRecordFactory<? extends IMonitoringRecord> recordFactory = this.cachedRecordFactoryCatalog.get(recordClassName); final IMonitoringRecord record = recordFactory.create(BinaryValueDeserializer.create(buffer, this.stringRegistry)); record.setLoggingTimestamp(loggingTimestamp); super.deliver(OUTPUT_PORT_NAME_RECORDS, record); } catch (final RecordInstantiationException ex) { this.logger.error("Failed to create record", ex); } }
readingReaders--; } else { super.deliver(OUTPUT_PORT_NAME_RECORDS, record);
/** * {@inheritDoc} */ @Override public boolean read() { for (final T obj : this.objects) { super.deliver(ListReader.OUTPUT_PORT_NAME, obj); } try { if (this.awaitTermination) { this.log.info("Awaiting termination latch to count down ..."); this.terminationLatch.await(); this.log.info("Passed termination latch"); } } catch (final InterruptedException e) { this.log.error("Reader interrupted while awaiting termination", e); return false; } return true; }
readingReaders--; } else { super.deliver(OUTPUT_PORT_NAME_RECORDS, record);
private void read(final ByteBuffer buffer) { final int clazzId = buffer.getInt(); final long loggingTimestamp = buffer.getLong(); try { // NOCS (Nested try-catch) // final IMonitoringRecord record = AbstractMonitoringRecord.createFromByteBuffer(clazzid, buffer, this.stringRegistry); final String recordClassName = this.stringRegistry.get(clazzId); final IRecordFactory<? extends IMonitoringRecord> recordFactory = this.cachedRecordFactoryCatalog.get(recordClassName); final IMonitoringRecord record = recordFactory.create(DefaultValueDeserializer.create(buffer, this.stringRegistry)); record.setLoggingTimestamp(loggingTimestamp); super.deliver(OUTPUT_PORT_NAME_RECORDS, record); } catch (final RecordInstantiationException ex) { this.log.error("Failed to create record", ex); } }