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.

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.

    This method can also read an array of nullable booleans, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable float32s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable float64s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable int16s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable int32s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable int64s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read an array of nullable int8s, as long as it does not contain null values. If a null array item is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read array of non-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.

    This method can also read array of non-nullable float32s.

    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.

    This method can also read array of non-nullable float64s.

    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.

    This method can also read array of non-nullable int16s.

    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.

    This method can also read array of non-nullable int32s.

    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.

    This method can also read array of non-nullable int64s.

    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.

    This method can also read array of non-nullable int8s.

    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.

    This method can also read a nullable boolean, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable float32, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable float64, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable int16, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable int32, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable int64, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a nullable int8, as long as it is not null. If a null value is read with this method, HazelcastSerializationError is thrown.

    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.

    This method can also read a non-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.

    This method can also read a non-nullable float32.

    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.

    This method can also read a non-nullable float64.

    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.

    This method can also read a non-nullable int16.

    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.

    This method can also read a non-nullable int32.

    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.

    This method can also read a non-nullable int64.

    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.

    This method can also read a non-nullable int8.

    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