Package com.illumon.iris.binarystore
Interface TableReader
- All Known Subinterfaces:
BinaryStoreBufferProcessor
,SkipableTableReader
- All Known Implementing Classes:
AbstractBinaryStoreReader
,AbstractBinaryStoreReaderV1
,AbstractBinaryStoreReaderV2
,BinaryStoreBufferProcessorV1
,BinaryStoreBufferProcessorV2
,BinaryStoreReaderV1
,BinaryStoreReaderV2
,BinaryStoreSocketReaderV2
,DelegatingBinaryStoreV2BufferProcessor
,StreamTableReader
,SwitchBinaryStoreReader
public interface TableReader
Row-oriented table reading interface.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the input source for this TableReader.int
Get the application version associated with the file being read by this TableReader.String[]
Get an array of all known column names.getColumnType
(String columnName) Get the SupportedType of the named column.Retrieve the getter for the row flags.Return a raw RowGetter for the column with the given name.<T> RowGetter<T>
Return a typed RowGetter for the column with the given name.default <T> RowGetter<T>
getPropertyGetter
(String property) Retrieve a getter for the specified internal property.default Supplier<RecordData>
Retrieve the getter for the RecordData.default void
CallreadEntry()
until it returns false.default void
readAllEntries
(Supplier<Boolean> additionalCondition) CallreadEntry()
until the additionalCondition evaluates to false, orreadEntry()
returns false.default boolean
Read a record from the source, expecting that not all records will be Row records.boolean
readRow()
Deprecated.
-
Method Details
-
getGetter
Return a raw RowGetter for the column with the given name. RowGetter.get() will return Object.- Parameters:
name
- the column name- Returns:
- a RowGetter
-
getGetter
Return a typed RowGetter for the column with the given name. RowGetter.get() will return type tClass.- Parameters:
name
- the column name- Returns:
- a RowGetter of type tClass
-
readRow
Deprecated.usereadEntry()
and handle record entries appropriatelyRead a row from the source, expecting that all entries will be Rows. If a record entry is encountered, anIllegalStateException
will be thrown.- Returns:
- true if successful, false if EOF or an error is encountered.
- Throws:
IOException
- if EOF is encountered mid-row or any invalid data is encountered.IllegalStateException
- if a record entry is encountered.
-
close
Close the input source for this TableReader.- Throws:
IOException
-
getColumnNames
String[] getColumnNames()Get an array of all known column names. These can be used to determine valid column names for use ingetGetter(String)
.- Returns:
- a new array of all known column names.
-
getColumnType
Get the SupportedType of the named column.- Parameters:
columnName
- the name of the column- Returns:
- the SupportedType value for the named column
- Throws:
RuntimeException
- if the columnName is not a valid column
-
getFlagGetter
Retrieve the getter for the row flags.- Returns:
- a getter that returns the flags for each row.
-
getRecordDataGetter
Retrieve the getter for the RecordData.- Returns:
- a getter that returns the data for the currently read record.
-
getApplicationVersion
int getApplicationVersion()Get the application version associated with the file being read by this TableReader.- Returns:
- the file's application version
-
readEntry
Read a record from the source, expecting that not all records will be Row records.
Note: The default implementation delegates to the now-deprecatedreadRow()
, which cannot handle record entries.- Returns:
- true if successful, false if EOF or an error is encountered.
- Throws:
IOException
- if EOF is encountered mid-entry or any invalid data is encountered.
-
readAllEntries
CallreadEntry()
until it returns false. This relies on the Row and Record callbacks.- Throws:
IOException
-
readAllEntries
CallreadEntry()
until the additionalCondition evaluates to false, orreadEntry()
returns false. This relies on the Row and Record callbacks.- Parameters:
additionalCondition
- an extra condition that might stop the loop.- Throws:
IOException
-
getPropertyGetter
Retrieve a getter for the specified internal property.This method is intended for use with instrumentation.
- Parameters:
property
- The property to get a getter for- Returns:
- A correctly typed getter for the property.
-
readEntry()
and handle record entries appropriately