Object

it.agilelab.darwin.connector.confluent

ConfluentSingleObjectEncoding

Related Doc: package confluent

Permalink

object ConfluentSingleObjectEncoding

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfluentSingleObjectEncoding
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def byteArray2HexString(bytes: Array[Byte]): String

    Permalink

    Converts a byte array into its hexadecimal string representation e.g.

    Converts a byte array into its hexadecimal string representation e.g. for the V1_HEADER => [C3 01]

    bytes

    a byte array

    returns

    the hexadecimal string representation of the input byte array

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def dropHeader(avroSingleObjectEncoded: Array[Byte]): Array[Byte]

    Permalink

    Extract the payload from an avro single-object encoded byte array, removing the header (the first 5 bytes)

    Extract the payload from an avro single-object encoded byte array, removing the header (the first 5 bytes)

    avroSingleObjectEncoded

    avro single-object encoded byte array

    returns

    the payload without the avro single-object encoded header

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def extractId(inputStream: InputStream, endianness: ByteOrder): Either[Array[Byte], Long]

    Permalink

    Extracts the schema ID from the avro single-object encoded at the head of this input stream.

    Extracts the schema ID from the avro single-object encoded at the head of this input stream. The input stream will have 10 bytes consumed if the first two bytes correspond to the single object encoded header, or zero bytes consumed if the InputStream supports marking; if it doesn't, the first byte will be consumed and returned in the Left part of the Either.

    inputStream

    avro single-object encoded input stream

    endianness

    the endianness that will be used to read fingerprint bytes, it won't affect how avro payload is read, that is up to the darwin user

    returns

    the schema ID extracted from the input data

  11. def extractId(avroSingleObjectEncoded: ByteBuffer, endianness: ByteOrder): Long

    Permalink

    Extracts the schema ID from the avro single-object encoded ByteBuffer, the ByteBuffer position will be after the header when this method returns

    Extracts the schema ID from the avro single-object encoded ByteBuffer, the ByteBuffer position will be after the header when this method returns

    avroSingleObjectEncoded

    avro single-object encoded byte array

    endianness

    the endianness that will be used to read fingerprint bytes, it won't affect how avro payload is read, that is up to the darwin user

    returns

    the schema ID extracted from the input data

  12. def extractId(avroSingleObjectEncoded: Array[Byte], endianness: ByteOrder): Long

    Permalink

    Extracts the schema ID from the avro single-object encoded byte array

    Extracts the schema ID from the avro single-object encoded byte array

    avroSingleObjectEncoded

    avro single-object encoded byte array

    endianness

    the endianness that will be used to read fingerprint bytes, it won't affect how avro payload is read, that is up to the darwin user

    returns

    the schema ID extracted from the input data

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def generateAvroSingleObjectEncoded(byteStream: OutputStream, schemaId: Long, endianness: ByteOrder)(avroWriter: (OutputStream) ⇒ OutputStream): OutputStream

    Permalink

    Writes to the given OutputStream the Single Object Encoding header then calls the avroWriter function to possibly add data to the stream and finally returns the OutputStream

    Writes to the given OutputStream the Single Object Encoding header then calls the avroWriter function to possibly add data to the stream and finally returns the OutputStream

    byteStream

    the stream to write to

    schemaId

    id of the schema used to encode the payload

    endianness

    the endianness that will be used to persist fingerprint bytes, it won't affect how avro payload is written, that is up to the darwin user

    avroWriter

    function that will be called to add user generated avro to the stream

    returns

    the input OutputStream

  15. def generateAvroSingleObjectEncoded(byteStream: OutputStream, avroValue: Array[Byte], schemaId: Long, endianness: ByteOrder): OutputStream

    Permalink

    Writes to the given OutputStream the Single Object Encoding header then the avroValue and returns the OutputStream

    Writes to the given OutputStream the Single Object Encoding header then the avroValue and returns the OutputStream

    byteStream

    the stream to write to

    avroValue

    the value to be written to the stream

    schemaId

    id of the schema used to encode the payload

    endianness

    the endianness that will be used to persist fingerprint bytes, it won't affect how avro payload is written, that is up to the darwin user

    returns

    the input OutputStream

  16. def generateAvroSingleObjectEncoded(avroPayload: Array[Byte], schemaId: Long, endianness: ByteOrder): Array[Byte]

    Permalink

    Create an array that creates a Single-Object encoded byte array.

    Create an array that creates a Single-Object encoded byte array. By specifications the encoded array is obtained concatenating the V1_HEADER, the schema id and the avro-encoded payload.

    avroPayload

    avro-serialized payload

    schemaId

    id of the schema used to encode the payload

    endianness

    a byte order to drive endianness of schemaId

    returns

    a Single-Object encoded byte array

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getId(schema: Schema, fingerprinter: (Schema) ⇒ Long): Long

    Permalink

    Extracts the ID from a Schema.

    Extracts the ID from a Schema.

    schema

    a Schema with unknown ID

    returns

    the ID associated with the input schema

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def isAvroSingleObjectEncoded(data: ByteBuffer): Boolean

    Permalink

    Checks if a byte array is Avro Single-Object encoded in the Confluent way (i.e.

    Checks if a byte array is Avro Single-Object encoded in the Confluent way (i.e. byte 0 then an int)

    data

    a ByteBuffer that will not be altered position wise by this method

    returns

    true if the input byte array is Single-Object encoded

  21. def isAvroSingleObjectEncoded(data: Array[Byte]): Boolean

    Permalink

    Checks if a byte array is Avro Single-Object encoded in the Confluent way (i.e.

    Checks if a byte array is Avro Single-Object encoded in the Confluent way (i.e. byte 0 then an int)

    data

    a byte array

    returns

    true if the input byte array is Single-Object encoded

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def parseException(): DarwinException

    Permalink

    Exception that can be thrown if the data is not single-object encoded

  27. def readInt(buf: ByteBuffer, endianness: ByteOrder): Long

    Permalink

    Reads the content of the byte buffer honoring the input endianness and returns it.

    Reads the content of the byte buffer honoring the input endianness and returns it. When this method returns the buffer position will 8 bytes forward but the byte order will be unchanged whatever the values of endianness and buf.order() are.

    Annotations
    @inline()
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def writeHeaderToStream(byteStream: OutputStream, schemaId: Long, endianness: ByteOrder): OutputStream

    Permalink

    Writes to the given OutputStream the Single Object Encoding header and returns the OutputStream

    Writes to the given OutputStream the Single Object Encoding header and returns the OutputStream

    endianness

    the endianness that will be used to persist fingerprint bytes, it won't affect how avro payload is written, that is up to the darwin user

    returns

    the input OutputStream

Inherited from AnyRef

Inherited from Any

Ungrouped