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 Details

  • 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

      void send​(@NotNull com.fishlib.io.sched.IOJob job) throws IOException

      Send this item's contents over the supplied I/O job.

      The header format is:

      This is followed by a type-specific body representing the item's contents

      Parameters:
      job - The job to send over
      Throws:
      IOException
    • read

      void read​(@NotNull ByteBuffer buffer, byte wireDataType)

      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 from
      wireDataType - 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