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

Methods

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean[]

  • 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.

    Returns

    the value of the field.

    Type Parameters

    • T

    Parameters

    • fieldName: string

      name of the field.

    Returns T[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDate[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns BigDecimal[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns Buffer

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns string[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalTime[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDateTime[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns OffsetDateTime[]

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean

  • 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.

    Returns

    the value of the field.

    Type Parameters

    • T

    Parameters

    • fieldName: string

      name of the field.

    Returns T

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDate

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns BigDecimal

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns boolean

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns Long

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns number

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns string

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalTime

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns LocalDateTime

  • 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.

    Returns

    the value of the field.

    Parameters

    • fieldName: string

      name of the field.

    Returns OffsetDateTime

Generated using TypeDoc