/** * Publish the description for this timeseries This is performed automatically at start of series * data publication, but subsequent changes to the description will not be published * automatically, and this method provides a means to send an update */ public void publishDescription(IdentifiableTimeSeries identifiable) { SeriesDescriptionMessage d = udpMessageFactory.createTimeSeriesDescriptionMessage( identifiable.getPath(), identifiable.getDescription()); seriesWithDescriptionsPublished.put(identifiable, null); safelyAddToQueue(d); }
public void itemsAddedOrInserted(TimeSeriesEvent e) { if (e.isAppend()) { IdentifiableTimeSeries i = (IdentifiableTimeSeries) e.getSource(); // only publish the description at the first point we actually have valid data to publish // this avoids creating unnecessary empty series in downstream components if (!isDescriptionPublished(i)) { publishDescription(i); } if (e.getItems().size() == 1) { TimeSeriesValueMessage m = udpMessageFactory.createTimeSeriesValueMessage(i.getPath(), e.getItems().get(0)); safelyAddToQueue(m); if (!started.getAndSet(true)) { startPublisherQueue(); } } } }
/** Stop publishing single items appends for series s */ public void stopPublishing(IdentifiableTimeSeries s) { s.removeTimeSeriesListener(appendPublishingListener); }
/** Publish all single item appends to series s */ public void publishAppends(IdentifiableTimeSeries s) { s.addTimeSeriesListener(appendPublishingListener); }