Class AckRescanMessage
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.PayloadDataImportChannelItem
com.illumon.iris.db.tables.dataimport.logtailer.AckMessage
com.illumon.iris.db.tables.dataimport.logtailer.AckRescanMessage
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable,DataImportChannelItem
public class AckRescanMessage extends AckMessage
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.tables.dataimport.logtailer.AckMessage
AckMessage.Result -
Field Summary
Fields Modifier and Type Field Description protected static intBASELINE_VERSIONThe version of any data item that isn't given an explicit version.protected Exceptionexceptionprotected longidprotected static com.fishlib.io.logger.Loggerlogprotected static intNO_VERSIONThe version of data items that predate systematic versioning.protected AckMessage.Resultresultprotected intversionprotected static intVERSION_INDICATORThis 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, VERSION_SIZE -
Constructor Summary
Constructors Modifier Constructor Description protectedAckRescanMessage(AckRescanMessage from) -
Method Summary
Modifier and Type Method Description com.fishlib.base.log.LogOutputappend(com.fishlib.base.log.LogOutput logOutput)protected voidcheckVersion()Allow subclasses to allow for future versions.DataImportChannelType[]getAlternateTypes()Get all alternate types that this item can process as input.intgetCurrentVersion()Get the latest version supported by this DataImportChannelItem.ExceptiongetException()longgetId()DataImportChannelTypegetPrimaryType()Get the item type.AckMessage.ResultgetResult()intgetVersion()Get 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.StringtoString()Methods inherited from class com.illumon.iris.db.tables.dataimport.logtailer.PayloadDataImportChannelItem
send
-
Field Details
-
id
protected long id -
exception
-
result
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
version
protected int version
-
-
Constructor Details
-
Method Details
-
getId
public long getId()- Overrides:
getIdin classAckMessage
-
getResult
- Overrides:
getResultin classAckMessage
-
getException
- Overrides:
getExceptionin classAckMessage
-
toString
- Overrides:
toStringin classAckMessage
-
append
public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput)- Specified by:
appendin interfacecom.fishlib.base.log.LogOutputAppendable- Overrides:
appendin classAckMessage
-
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.
-
getVersion
public int getVersion()Description copied from interface:DataImportChannelItemGet the version of this DataImportChannelItem.- Specified by:
getVersionin interfaceDataImportChannelItem- Returns:
- the version of the DataImportChannelItem.
-
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
-