@Override protected void process(List<Object> objs) { for (Object o : objs) { if (o instanceof NewSamplesData) { NewSamplesData data = (NewSamplesData) o; sampleSource.lock(); tagSet.lock(); sampleSource.addSamples(data.getSampleValues()); tagSet.newSample(data.getSamplesTimestamp()); tagSet.unlock(); sampleSource.unlock(); // set first sample timestamp for the tag recorder if (tagRecorderWorker != null && !tagRecorderWorker.isStartRecordingTimestampSet()) { tagRecorderWorker.setStartRecordingTimestamp(data.getSamplesTimestamp()); } // sends chunks to the signal recorder if (signalRecorderWorker != null) { signalRecorderWorker.offerChunk(data.getSampleValues()); if (!signalRecorderWorker.isFirstSampleTimestampSet()) signalRecorderWorker.setFirstSampleTimestamp(data.getSamplesTimestamp()); } } else { MonitorTag tag = (MonitorTag) o; tagSet.lock(); tagSet.addTag(tag); tagSet.unlock(); //record tag if (tagRecorderWorker != null) { tagRecorderWorker.offerTag(tag); } firePropertyChange("newTag", null, (MonitorTag) o); } } }