|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.data.VoidData
com.davisor.data.stream.JoinedDataStream
A JoinedDataStream makes a data stream out of several parallel streams.
Access to joined data buffers goes through the tools provided by TupleType and TupleData objects. Please see their respective documentation for more information.
JoinedDataBuffer,
TupleData,
TupleType| Field Summary | |
protected DataValue |
M_data
Next data element in stream. |
protected long |
M_index
Element id counter. |
protected java.lang.Object |
M_metaData
External meta data (may be null). |
protected DataStream[] |
M_streams
Stream components. |
| Fields inherited from class com.davisor.data.VoidData |
M_type |
| Fields inherited from interface com.davisor.data.stream.DataStream |
INITIAL_INDEX |
| Constructor Summary | |
JoinedDataStream(DataStream[] streams)
Creates a data stream out of an array of streams. |
|
JoinedDataStream(DataStream[] streams,
java.lang.String[] streamIDs)
Creates a data stream out of an array of streams and new stream identities. |
|
JoinedDataStream(DataStream[] streams,
TupleType type)
Creates a data stream out of an array of streams and the corresponding tuple type. |
|
JoinedDataStream(DataStream stream1,
java.lang.String stream1ID,
DataStream stream2,
java.lang.String stream2ID)
Creates a data stream out of two streams. |
|
JoinedDataStream(DataStream stream1,
java.lang.String stream1ID,
DataStream stream2,
java.lang.String stream2ID,
DataStream stream3,
java.lang.String stream3ID)
Creates a data stream out of two streams. |
|
JoinedDataStream(java.util.Iterator streamDatas,
java.util.Iterator streamTypes,
java.util.List streamIDs)
Creates a data stream out of a list of data lists, type list, list of identities. |
|
JoinedDataStream(java.util.List streams)
Creates a data stream out of a list of streams. |
|
JoinedDataStream(java.util.List streams,
java.util.List streamIDs)
Creates a data stream out of a list of streams and new stream identities. |
|
| Method Summary | |
boolean |
close()
This method frees resources for cargabe collection. |
long |
getIndex()
Retrieves the index number of the element returned by the latest next() call. |
boolean |
hasNext()
Tests if the stream still contains data. |
DataValue |
next()
Gets the next data from the stream. |
java.lang.String |
toString()
Gets the stream string representation. |
| Methods inherited from class com.davisor.data.VoidData |
equals, getDataValue, getType, hashCode, setType |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.Data |
getType |
| Field Detail |
protected DataValue M_data
protected long M_index
protected java.lang.Object M_metaData
protected DataStream[] M_streams
| Constructor Detail |
public JoinedDataStream(DataStream[] streams)
throws InvalidDataException
streams - stream component streams
InvalidDataException - if the substream content does not
satisfy the given typeJoinedDataStream(DataStream[],String[])
public JoinedDataStream(java.util.List streams)
throws InvalidDataException
streams - stream component streams
InvalidDataException - if the substream content does not
satisfy the given typeJoinedDataStream(List,List)
public JoinedDataStream(DataStream[] streams,
TupleType type)
throws InvalidDataException
streams - stream component streamstype - combined stream types
InvalidDataException - if the substream content does not
satisfy the given type
public JoinedDataStream(DataStream[] streams,
java.lang.String[] streamIDs)
throws InvalidDataException
streams - streams to be joinedstreamIDs - unique ids for each stream (may be null)
InvalidDataException - if the substream content does not
satisfy the given typeJoinedDataStream(DataStream[]),
Type.setID(java.lang.String)
public JoinedDataStream(java.util.List streams,
java.util.List streamIDs)
throws InvalidDataException
streams - streams to be joinedstreamIDs - unique ids for each stream (may be null)
InvalidDataException - if the substream content does not
satisfy the given typeJoinedDataStream(List)
public JoinedDataStream(java.util.Iterator streamDatas,
java.util.Iterator streamTypes,
java.util.List streamIDs)
throws InvalidDataException
streamDatas - component stream data listsstreamTypes - componen stream typesstreamIDs - unique ids for each stream (may be null)
InvalidDataException - if the substream content does not
satisfy the given typeJoinedDataStream(List)
public JoinedDataStream(DataStream stream1,
java.lang.String stream1ID,
DataStream stream2,
java.lang.String stream2ID)
throws InvalidDataException
stream1 - first streamstream1ID - first stream new identitystream2 - second streamstream2ID - second stream new identity
InvalidDataException - if the substream content does not
satisfy the given type
public JoinedDataStream(DataStream stream1,
java.lang.String stream1ID,
DataStream stream2,
java.lang.String stream2ID,
DataStream stream3,
java.lang.String stream3ID)
throws InvalidDataException
stream1 - first streamstream1ID - first stream new identitystream2 - second streamstream2ID - second stream new identitystream3 - third streamstream3ID - third stream new identity
InvalidDataException - if the substream content does not
satisfy the given type| Method Detail |
public boolean close()
close in interface DataStreamDataStream.hasNext()public long getIndex()
next() call. The index represents the position of the
element within this stream. The stream index may or may
not be equal to any other indexes the element itself thinks it
posesses.
The index value is initially -1, indicating no
element. After first next() call, index becomes 0, then
1, and so on. This functionality resembles
java.sql.resultSet#getRow method functionality, but
with the difference that the index counter starts from 0, not 1.
getIndex in interface DataStreampublic boolean hasNext()
hasNext in interface DataStreamtrue if it does.
public DataValue next()
throws InvalidDataException
next in interface DataStreamInvalidDataException - if the substream content does not
satisfy the given type.public java.lang.String toString()
Depending on stream implementation, streams may or may not be permanently consumed by this operation.
toString in class VoidData
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||