Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides means of reading compact serialized fields from the binary data.

Read operations might throw HazelcastSerializationError when a field with the given name is not found or there is a type mismatch. On such occasions, one might handle this case via the getFieldKind method. Handling this situation might be especially useful if the class might evolve in future, either by adding or removing fields.

This API is currently in Beta and can change at any time.

Hierarchy

  • CompactReader

Index

Methods

  • Returns field type for the given field name. Returns FieldKind.NOT_AVAILABLE if such field does not exist.

    Parameters

    • fieldName: string

      the name of the field

    Returns FieldKind

  • readArrayOfBoolean(fieldName: string): boolean[]
  • Reads an array of booleans.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean[]

    the value of the field.

  • readArrayOfCompact<T>(fieldName: string): T[]
  • Reads an array of compact objects.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Type parameters

    • T

    Parameters

    • fieldName: string

      name of the field.

    Returns T[]

    the value of the field.

  • readArrayOfDate(fieldName: string): LocalDate[]
  • Reads an array of LocalDate objects consisting of year, month, and day.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDate[]

    the value of the field.

  • readArrayOfDecimal(fieldName: string): BigDecimal[]
  • Reads an array of BigDecimal objects.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns BigDecimal[]

    the value of the field.

  • readArrayOfFloat32(fieldName: string): number[]
  • Reads an array of 32-bit IEEE 754 floating point numbers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfFloat64(fieldName: string): number[]
  • Reads an array of 64-bit IEEE 754 floating point numbers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfInt16(fieldName: string): number[]
  • Reads an array of 16-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfInt32(fieldName: string): number[]
  • Reads an array of 32-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfInt64(fieldName: string): Long[]
  • Reads an array of 64-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long[]

    the value of the field.

  • readArrayOfInt8(fieldName: string): Buffer
  • Reads an array of 8-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns Buffer

    the value of the field.

  • readArrayOfNullableBoolean(fieldName: string): boolean[]
  • Reads a nullable array of nullable booleans.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean[]

    the value of the field.

  • readArrayOfNullableFloat32(fieldName: string): number[]
  • Reads a nullable array of nullable 32-bit IEEE 754 floating point numbers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfNullableFloat64(fieldName: string): number[]
  • Reads a nullable array of nullable 64-bit IEEE 754 floating point numbers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfNullableInt16(fieldName: string): number[]
  • Reads a nullable array of nullable 16-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfNullableInt32(fieldName: string): number[]
  • Reads a nullable array of nullable 32-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfNullableInt64(fieldName: string): Long[]
  • Reads a nullable array of nullable 64-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long[]

    the value of the field.

  • readArrayOfNullableInt8(fieldName: string): number[]
  • Reads a nullable array of nullable 8-bit two's complement signed integers.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

    the value of the field.

  • readArrayOfString(fieldName: string): string[]
  • Reads an array of UTF-8 encoded strings.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns string[]

    the value of the field.

  • readArrayOfTime(fieldName: string): LocalTime[]
  • Reads an array of LocalTime objects consisting of hour, minute, second, and nanoseconds.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalTime[]

    the value of the field.

  • Reads an array of LocalDateTime objects consisting of date and time.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDateTime[]

    the value of the field.

  • Reads an array of OffsetDateTime objects consisting of date, time and timezone offset.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns OffsetDateTime[]

    the value of the field.

  • readBoolean(fieldName: string): boolean
  • Reads a boolean.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean

    the value of the field.

  • readCompact<T>(fieldName: string): T
  • Reads a compact object.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Type parameters

    • T

    Parameters

    • fieldName: string

      name of the field.

    Returns T

    the value of the field.

  • Reads a LocalDate consisting of year, month, and day.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDate

    the value of the field.

  • Reads an arbitrary precision and scale floating point number.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns BigDecimal

    the value of the field.

  • readFloat32(fieldName: string): number
  • Reads a 32-bit IEEE 754 floating point number.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readFloat64(fieldName: string): number
  • Reads a 64-bit IEEE 754 floating point number.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readInt16(fieldName: string): number
  • Reads a 16-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readInt32(fieldName: string): number
  • Reads a 32-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readInt64(fieldName: string): Long
  • Reads a 64-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long

    the value of the field.

  • readInt8(fieldName: string): number
  • Reads an 8-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readNullableBoolean(fieldName: string): boolean
  • Reads a nullable boolean.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean

    the value of the field.

  • readNullableFloat32(fieldName: string): number
  • Reads a nullable 32-bit IEEE 754 floating point number.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readNullableFloat64(fieldName: string): number
  • Reads a nullable 64-bit IEEE 754 floating point number.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readNullableInt16(fieldName: string): number
  • Reads a nullable 16-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readNullableInt32(fieldName: string): number
  • Reads a nullable 32-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readNullableInt64(fieldName: string): Long
  • Reads a nullable 64-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long

    the value of the field.

  • readNullableInt8(fieldName: string): number
  • Reads a nullable 8-bit two's complement signed integer.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

    the value of the field.

  • readString(fieldName: string): string
  • Reads a UTF-8 encoded string.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns string

    the value of the field.

  • Reads a LocalTime consisting of hour, minute, second, and nano seconds.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalTime

    the value of the field.

  • Reads a LocalDateTime consisting of date and time.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDateTime

    the value of the field.

  • Reads a OffsetDateTime consisting of date, time and timezone offset.

    throws

    HazelcastSerializationError if the field does not exist in the schema, or the type of the field does not match with the one defined in the schema.

    Parameters

    • fieldName: string

      name of the field.

    Returns OffsetDateTime

    the value of the field.

Generated using TypeDoc