Class FilePosition.Legacy
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.PayloadDataImportChannelItem
com.illumon.iris.db.tables.dataimport.logtailer.FilePosition
com.illumon.iris.db.tables.dataimport.logtailer.FilePosition.Legacy
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,DataImportChannelItem
- Enclosing class:
- FilePosition
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.tables.dataimport.logtailer.FilePosition
FilePosition.Legacy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
The version of any data item that isn't given an explicit version.protected static com.fishlib.io.logger.Logger
protected static final int
The version of data items that predate systematic versioning.protected int
protected static final int
This sequence indicates that a version int follows.Fields inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannelItem
HEADER_SIZE, MAX_DATA_BODY_SIZE, MAX_NON_DATA_BODY_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionGet all alternate types that this item can process as input.int
Get the latest version supported by this DataImportChannelItem.Get the item type.int
Get the version of this DataImportChannelItem.protected void
prepareVersion
(ByteBuffer bodyBuffer) Put the version bytes into the body buffer.void
read
(ByteBuffer buffer, byte wireDataType) Fill this item's contents from the supplied buffer.Methods inherited from class com.illumon.iris.db.tables.dataimport.logtailer.FilePosition
append, checkVersion, finishRead, toString
Methods inherited from class com.illumon.iris.db.tables.dataimport.logtailer.PayloadDataImportChannelItem
send
-
Field Details
-
log
protected static com.fishlib.io.logger.Logger log -
NO_VERSION
protected static final int NO_VERSIONThe version of data items that predate systematic versioning.- See Also:
-
BASELINE_VERSION
protected static final int BASELINE_VERSIONThe version of any data item that isn't given an explicit version. This should never change.- See Also:
-
VERSION_INDICATOR
protected static final int VERSION_INDICATORThis sequence indicates that a version int follows. Where this might be expected, its absence indicates the default or baseline version will be assumed. The value should be negative to avoid any chance of confusion with a size.- See Also:
-
version
protected int version
-
-
Method Details
-
prepareVersion
Put the version bytes into the body buffer. Does not clear or flip the buffer. This is called only by PayloadDataImportChannelItem on behalf of derived classes.- Parameters:
bodyBuffer
- the buffer to populate
-
getPrimaryType
Description copied from interface:DataImportChannelItem
Get the item type.- Specified by:
getPrimaryType
in interfaceDataImportChannelItem
- Returns:
- The item type
-
getAlternateTypes
Description copied from interface:DataImportChannelItem
Get all alternate types that this item can process as input.- Specified by:
getAlternateTypes
in interfaceDataImportChannelItem
- Returns:
- The alternate Types
-
read
Description copied from interface:DataImportChannelItem
Fill this item's contents from the supplied buffer.
Header data as described in
DataImportChannelItem.send(IOJob)
will already have been consumed.- Specified by:
read
in interfaceDataImportChannelItem
- Parameters:
buffer
- The buffer to read data fromwireDataType
- the data type from the stream.
-
getVersion
public int getVersion()Description copied from interface:DataImportChannelItem
Get the version of this DataImportChannelItem.- Specified by:
getVersion
in interfaceDataImportChannelItem
- Returns:
- the version of the DataImportChannelItem.
-
getCurrentVersion
public int getCurrentVersion()Description copied from interface:DataImportChannelItem
Get the latest version supported by this DataImportChannelItem. This is used by abstract implementations to verify the version read off the wire.- Specified by:
getCurrentVersion
in interfaceDataImportChannelItem
- Returns:
- the latest version supported by this DataImportChannelItem
-