Package com.illumon.iris.binarystore
Class SwitchBinaryStoreReader
java.lang.Object
com.illumon.iris.binarystore.SwitchBinaryStoreReader
- All Implemented Interfaces:
SkipableTableReader,TableReader
Reads the magic number and selects either a V1 or V2 binary store reader as appropriate.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.binarystore.TableReader
TableReader.MissingPropertyGetterException -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the input source for this TableReader.intGet the application version associated with the file being read by this TableReader.intString[]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.Retrieve the getter for the RecordData.longgetSize()getTypeMetadataString(String columnName) Return a string summary of the named column's metadata.booleanRead a record from the source, expecting that not all records will be Row records.booleanreadRow()Deprecated.voidsetBlocking(boolean blocking) As implemented, blocking means sleep and retry.voidsetRecordHandler(Runnable handler) voidsetRowHandler(Runnable handler) voidskipToRecord(long recordNo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.TableReader
getPropertyGetter, readAllEntries, readAllEntries
-
Field Details
-
tableReader
-
-
Constructor Details
-
SwitchBinaryStoreReader
- Throws:
IOException
-
SwitchBinaryStoreReader
- Throws:
IOException
-
-
Method Details
-
getGetter
Description copied from interface:TableReaderReturn a raw RowGetter for the column with the given name. RowGetter.get() will return Object.- Specified by:
getGetterin interfaceTableReader- Parameters:
name- the column name- Returns:
- a RowGetter
-
getGetter
Description copied from interface:TableReaderReturn a typed RowGetter for the column with the given name. RowGetter.get() will return type tClass.- Specified by:
getGetterin interfaceTableReader- Parameters:
name- the column name- Returns:
- a RowGetter of type tClass
-
readRow
Deprecated.Description copied from interface:TableReaderRead a row from the source, expecting that all entries will be Rows. If a record entry is encountered, anIllegalStateExceptionwill be thrown.- Specified by:
readRowin interfaceTableReader- 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.
-
readEntry
Description copied from interface:TableReaderRead a record from the source, expecting that not all records will be Row records.
Note: The default implementation delegates to the now-deprecatedTableReader.readRow(), which cannot handle record entries.- Specified by:
readEntryin interfaceTableReader- 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.
-
close
Description copied from interface:TableReaderClose the input source for this TableReader.- Specified by:
closein interfaceTableReader- Throws:
IOException
-
getColumnNames
Description copied from interface:TableReaderGet an array of all known column names. These can be used to determine valid column names for use inTableReader.getGetter(String).- Specified by:
getColumnNamesin interfaceTableReader- Returns:
- a new array of all known column names.
-
getColumnType
Description copied from interface:TableReaderGet the SupportedType of the named column.- Specified by:
getColumnTypein interfaceTableReader- Parameters:
columnName- the name of the column- Returns:
- the SupportedType value for the named column
-
getFlagGetter
Description copied from interface:TableReaderRetrieve the getter for the row flags.- Specified by:
getFlagGetterin interfaceTableReader- Returns:
- a getter that returns the flags for each row.
-
getApplicationVersion
public int getApplicationVersion()Description copied from interface:TableReaderGet the application version associated with the file being read by this TableReader.- Specified by:
getApplicationVersionin interfaceTableReader- Returns:
- the file's application version
-
getBinaryStoreFormat
public int getBinaryStoreFormat() -
skipToRecord
- Specified by:
skipToRecordin interfaceSkipableTableReader- Throws:
IOException
-
getSize
- Specified by:
getSizein interfaceSkipableTableReader- Throws:
IOException
-
setBlocking
public void setBlocking(boolean blocking) Description copied from interface:SkipableTableReaderAs implemented, blocking means sleep and retry.- Specified by:
setBlockingin interfaceSkipableTableReader
-
getTypeMetadataString
Return a string summary of the named column's metadata.- Parameters:
columnName- the column to query- Returns:
- a summary of the metadata, augmented as possible
-
setRecordHandler
-
setRowHandler
-
getRecordDataGetter
Description copied from interface:TableReaderRetrieve the getter for the RecordData.- Specified by:
getRecordDataGetterin interfaceTableReader- Returns:
- a getter that returns the data for the currently read record.
-