Interface DataImportChannelItem
- All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable
- All Known Subinterfaces:
IdDataImportChannelItem
- All Known Implementing Classes:
AckMessage
,AckRescanMessage
,AckTruncateMessage
,FilePosition
,FilePosition.Legacy
,PayloadDataImportChannelItem
,RescanDataItem
,TableIdentifierDataItem
,TruncatePartitionDataItem
public interface DataImportChannelItem
extends com.fishlib.base.log.LogOutputAppendable
Interface for all message types exchanged via the data import protocol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
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.void
read
(ByteBuffer buffer, byte wireDataType) Fill this item's contents from the supplied buffer.void
send
(io.deephaven.enterprise.niowrapper.sched.IOJob job) Send this item's contents over the supplied I/O job.Methods inherited from interface com.fishlib.base.log.LogOutputAppendable
append
-
Field Details
-
HEADER_SIZE
static final int HEADER_SIZE -
MAX_NON_DATA_BODY_SIZE
static final int MAX_NON_DATA_BODY_SIZE -
MAX_DATA_BODY_SIZE
static final int MAX_DATA_BODY_SIZE
-
-
Method Details
-
getPrimaryType
DataImportChannelType getPrimaryType()Get the item type.- Returns:
- The item type
-
getAlternateTypes
DataImportChannelType[] getAlternateTypes()Get all alternate types that this item can process as input.- Returns:
- The alternate Types
-
send
Send this item's contents over the supplied I/O job.
The header format is:
- 1 byte :
DataImportChannelType.getWireValue()
- 4 bytes : int length of implementation data following the type and length
This is followed by a type-specific body representing the item's contents
- Parameters:
job
- The job to send over- Throws:
IOException
- 1 byte :
-
read
Fill this item's contents from the supplied buffer.
Header data as described in
send(IOJob)
will already have been consumed.- Parameters:
buffer
- The buffer to read data fromwireDataType
- the data type from the stream.
-
getVersion
int getVersion()Get the version of this DataImportChannelItem.- Returns:
- the version of the DataImportChannelItem.
-
getCurrentVersion
int getCurrentVersion()Get the latest version supported by this DataImportChannelItem. This is used by abstract implementations to verify the version read off the wire.- Returns:
- the latest version supported by this DataImportChannelItem
-