Class DisConfigurationDataItem
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.PayloadDataImportChannelItem
com.illumon.iris.db.tables.dataimport.logtailer.DisConfigurationDataItem
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable,DataImportChannelItem
public class DisConfigurationDataItem
extends PayloadDataImportChannelItem
implements com.fishlib.base.log.LogOutputAppendable
A
DataImportChannelItem containing data relevant from a DIS to a tailer.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intThe version of any data item that isn't given an explicit version.protected static com.fishlib.io.logger.Loggerprotected static final intThe version of data items that predate systematic versioning.protected intprotected static final intThis 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 TypeMethodDescriptioncom.fishlib.base.log.LogOutputappend(com.fishlib.base.log.LogOutput logOutput) protected voidAllow subclasses to allow for future versions.voidfinishRead(ByteBuffer buffer, byte wireDataType) Get all alternate types that this item can process as input.intGet the latest version supported by this DataImportChannelItem.intGet the item type.intGet the version of this DataImportChannelItem.protected voidprepareVersion(ByteBuffer bodyBuffer) Put the version bytes into the body buffer.voidread(ByteBuffer buffer, byte wireDataType) Fill this item's contents from the supplied buffer.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
-
append
public com.fishlib.base.log.LogOutput append(@NotNull com.fishlib.base.log.LogOutput logOutput) - Specified by:
appendin interfacecom.fishlib.base.log.LogOutputAppendable
-
getDisMaxBufferSize
public int getDisMaxBufferSize() -
finishRead
-
getCurrentVersion
public int getCurrentVersion()Description copied from interface:DataImportChannelItemGet the latest version supported by this DataImportChannelItem. This is used by abstract implementations to verify the version read off the wire.- Specified by:
getCurrentVersionin interfaceDataImportChannelItem- Returns:
- the latest version supported by this DataImportChannelItem
-
getPrimaryType
Description copied from interface:DataImportChannelItemGet the item type.- Specified by:
getPrimaryTypein interfaceDataImportChannelItem- Returns:
- The item type
-
getAlternateTypes
Description copied from interface:DataImportChannelItemGet all alternate types that this item can process as input.- Specified by:
getAlternateTypesin interfaceDataImportChannelItem- Returns:
- The alternate Types
-
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
-
checkVersion
protected void checkVersion()Allow subclasses to allow for future versions. This is relevant for the data items that could be sent out to an older client. A subclass overriding this likely also needs to override finishRead to ensure that extra bytes are consumed (safely). -
read
Description copied from interface:DataImportChannelItemFill this item's contents from the supplied buffer.
Header data as described in
DataImportChannelItem.send(IOJob)will already have been consumed.- Specified by:
readin interfaceDataImportChannelItem- Parameters:
buffer- The buffer to read data fromwireDataType- the data type from the stream.
-
toString
-
getVersion
public int getVersion()Description copied from interface:DataImportChannelItemGet the version of this DataImportChannelItem.- Specified by:
getVersionin interfaceDataImportChannelItem- Returns:
- the version of the DataImportChannelItem.
-