public class MultiplexingDataStreamingEventIterator extends Object implements DataStreamingEventIterator<Proposition>
DataStreamingEvents. This implementation
groups (multiplexes) propositions retrieved from multiple
DataStreamingEventIterators by key id. It assembles all of the
propositions for a given key id with the help of a
PropositionDataStreamerProcessor. After this assembly has been
completed for each key id, the iterator calls the
PropositionDataStreamerProcessor's
PropositionDataStreamerProcessor.fireKeyCompleted(java.lang.String, java.util.List<org.protempa.proposition.Proposition>) method with
the key id and list of propositions. The iterator gets each assembled key id
and proposition list from the PropositionDataStreamerProcessor to
return to the caller. Subclasses of PropositionDataStreamerProcessor
may specify additional processing to be performed on the key id and
proposition list prior to returning them to the caller.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Calls the underlying
DataStreamingEventIterators
DataStreamingEventIterator.close() method. |
boolean |
hasNext()
Returns
true if the iteration has more
DataStreamingEvents. |
DataStreamingEvent<Proposition> |
next()
Returns the next
DataStreamingEvent in the iteration. |
public boolean hasNext()
throws DataSourceReadException
DataStreamingEventIteratortrue if the iteration has more
DataStreamingEvents. (In other words, returns true if next
would return a DataStreamingEvent rather than throwing an
exception.)hasNext in interface DataStreamingEventIterator<Proposition>DataStreamingEvents.DataSourceReadException - if an error occurred reading data from
the underlying data source.public DataStreamingEvent<Proposition> next() throws DataSourceReadException
DataStreamingEventIteratorDataStreamingEvent in the iteration.next in interface DataStreamingEventIterator<Proposition>DataStreamingEvent in the iteration.DataSourceReadException - if an error occurred reading data from
the underlying data source.public void close()
throws DataSourceReadException
DataStreamingEventIterators
DataStreamingEventIterator.close() method.close in interface AutoCloseableclose in interface DataStreamingEventIterator<Proposition>DataSourceReadExceptionCopyright © 2012–2016 Emory University. All rights reserved.