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 int
BASELINE_VERSION
The version of any data item that isn't given an explicit version.protected Exception
exception
protected long
id
protected static com.fishlib.io.logger.Logger
log
protected static int
NO_VERSION
The version of data items that predate systematic versioning.protected AckMessage.Result
result
protected int
version
protected static int
VERSION_INDICATOR
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, VERSION_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description protected
AckRescanMessage(AckRescanMessage from)
-
Method Summary
Modifier and Type Method Description com.fishlib.base.log.LogOutput
append(com.fishlib.base.log.LogOutput logOutput)
protected void
checkVersion()
Allow subclasses to allow for future versions.DataImportChannelType[]
getAlternateTypes()
Get all alternate types that this item can process as input.int
getCurrentVersion()
Get the latest version supported by this DataImportChannelItem.Exception
getException()
long
getId()
DataImportChannelType
getPrimaryType()
Get the item type.AckMessage.Result
getResult()
int
getVersion()
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.String
toString()
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:
getId
in classAckMessage
-
getResult
- Overrides:
getResult
in classAckMessage
-
getException
- Overrides:
getException
in classAckMessage
-
toString
- Overrides:
toString
in classAckMessage
-
append
public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput)- Specified by:
append
in interfacecom.fishlib.base.log.LogOutputAppendable
- Overrides:
append
in classAckMessage
-
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
-
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: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
-