Package com.attivio.client.streaming
Class StreamingRecordIteratorAbstract
- java.lang.Object
-
- com.attivio.client.streaming.StreamingRecordIteratorAbstract
-
public abstract class StreamingRecordIteratorAbstract extends java.lang.Object
Abstract class so that other iterators can share some of the logic.- Author:
- dnicodemus
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
fieldNameArray
Array of field names of the recordprotected int
fieldNameIndex
Index of the current field of the recordprotected java.lang.Object[]
fieldValueArray
Array of values of the current fieldprotected int
fieldValueIndex
Index of the current value of the current fieldprotected boolean
hasMoreResults
Whether or not there are more results in the stream
-
Constructor Summary
Constructors Constructor Description StreamingRecordIteratorAbstract()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFieldname()
Get the field name of the field moved to by the last nextField call.int
getNumValues()
Get the number of values in the array while accommodating the reuse of larger arrays for smaller numbers of values.protected abstract java.lang.Object
implFetchValue()
Fetch any valueprotected abstract void
implFirstValue()
Fetch the first valueprotected java.lang.Object
implNextValue()
protected boolean
implSimpleNextFieldOfRecord()
Get the next field of the record.java.lang.Object
nextValue()
Get the next value of the current field.void
reset()
Reset the field state information we are keeping about the record.
-
-
-
Field Detail
-
hasMoreResults
protected boolean hasMoreResults
Whether or not there are more results in the stream
-
fieldNameArray
protected java.lang.String[] fieldNameArray
Array of field names of the record
-
fieldNameIndex
protected int fieldNameIndex
Index of the current field of the record
-
fieldValueArray
protected java.lang.Object[] fieldValueArray
Array of values of the current field
-
fieldValueIndex
protected int fieldValueIndex
Index of the current value of the current field
-
-
Method Detail
-
implFirstValue
protected abstract void implFirstValue() throws AttivioException
Fetch the first value- Throws:
AttivioException
-
implFetchValue
protected abstract java.lang.Object implFetchValue()
Fetch any value
-
getNumValues
public int getNumValues()
Get the number of values in the array while accommodating the reuse of larger arrays for smaller numbers of values.
-
reset
public final void reset()
Reset the field state information we are keeping about the record.
-
implSimpleNextFieldOfRecord
protected final boolean implSimpleNextFieldOfRecord() throws AttivioException
Get the next field of the record.- Returns:
- true if there is a next field and false otherwise.
- Throws:
AttivioException
- When we can't read the first value
-
getFieldname
public java.lang.String getFieldname() throws AttivioException
Get the field name of the field moved to by the last nextField call.- Throws:
AttivioException
-
implNextValue
protected final java.lang.Object implNextValue()
- Returns:
- The next value or null if there are no more values.
-
nextValue
public final java.lang.Object nextValue() throws AttivioException
Get the next value of the current field.- Throws:
AttivioException
-
-