|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.buffer.TupleBatch
public class TupleBatch
Represents a set of indexed tuples. The beginning row
is the first row contained in this batch; if it equals "1" then it is the
first row of the tuple source, otherwise this is a batch of intermediate
tuples. The ending row
is the last row contained in
this tuple batch; it is equal to the beginning row plus the
number of rows
contained in this batch, minus one.
This object is immutable and Serializable;
Field Summary | |
---|---|
static long |
UNKNOWN_SIZE
|
Constructor Summary | |
---|---|
TupleBatch()
Required to honor Externalizable contract |
|
TupleBatch(int beginRow,
java.util.List listOfTupleLists)
Constructor |
|
TupleBatch(int beginRow,
java.util.List[] tuples)
Constructor |
Method Summary | |
---|---|
java.util.List[] |
getAllTuples()
Get all tuples |
int |
getBeginRow()
Return the number of the first row of the tuple source that is contained in this batch (one-based). |
int |
getEndRow()
Return number of the last row of the tuple source that is contained in this batch (one-based). |
int |
getRowCount()
Return the number of rows contained in this tuple batch |
long |
getSize()
Get the size of this batch - may be constant indicating unknown. |
boolean |
getTerminationFlag()
Check whether this batch is the last in a series of batches. |
java.util.List |
getTuple(int rowIndex)
Return the tuple at the given index (one-based). |
void |
readExternal(java.io.ObjectInput in)
|
void |
setDataTypes(java.lang.String[] types)
|
void |
setSize(long size)
Set the size of this batch. |
void |
setTerminationFlag(boolean terminationFlag)
Set whether this batch is the last in a series of batches. |
java.lang.String |
toString()
Return a String describing this object |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long UNKNOWN_SIZE
Constructor Detail |
---|
public TupleBatch()
public TupleBatch(int beginRow, java.util.List[] tuples)
beginRow
- indicates the row of the tuple source which is the
first row contained in this batchtuples
- array of List objects, each of which is
a single tuplepublic TupleBatch(int beginRow, java.util.List listOfTupleLists)
beginRow
- indicates the row of the tuple source which is the
first row contained in this batchlistOfTupleLists
- List containing List objects, each of which is
a single tupleMethod Detail |
---|
public int getBeginRow()
public int getEndRow()
public int getRowCount()
public java.util.List getTuple(int rowIndex)
public java.util.List[] getAllTuples()
public boolean getTerminationFlag()
public void setTerminationFlag(boolean terminationFlag)
terminationFlag
- True if lastpublic long getSize()
public void setSize(long size)
size
- Size in bytes or UNKNOWN_SIZEpublic void setDataTypes(java.lang.String[] types)
public java.lang.String toString()
toString
in class java.lang.Object
String
- representation of this TupleBatchpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |