Interface CompactWriter


public interface CompactWriter
Provides means of writing compact serialized fields to the binary data.
Since:
5.2
  • Method Details

    • writeBoolean

      void writeBoolean(@Nonnull String fieldName, boolean value)
      Writes a boolean.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeInt8

      void writeInt8(@Nonnull String fieldName, byte value)
      Writes an 8-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeInt16

      void writeInt16(@Nonnull String fieldName, short value)
      Writes a 16-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeInt32

      void writeInt32(@Nonnull String fieldName, int value)
      Writes a 32-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeInt64

      void writeInt64(@Nonnull String fieldName, long value)
      Writes a 64-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeFloat32

      void writeFloat32(@Nonnull String fieldName, float value)
      Writes a 32-bit IEEE 754 floating point number.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeFloat64

      void writeFloat64(@Nonnull String fieldName, double value)
      Writes a 64-bit IEEE 754 floating point number.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeString

      void writeString(@Nonnull String fieldName, @Nullable String value)
      Writes a UTF-8 encoded string.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeDecimal

      void writeDecimal(@Nonnull String fieldName, @Nullable BigDecimal value)
      Writes an arbitrary precision and scale floating point number.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeTime

      void writeTime(@Nonnull String fieldName, @Nonnull LocalTime value)
      Writes a time consisting of hour, minute, second, and nanoseconds.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeDate

      void writeDate(@Nonnull String fieldName, @Nonnull LocalDate value)
      Writes a date consisting of year, month, and day.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeTimestamp

      void writeTimestamp(@Nonnull String fieldName, @Nonnull LocalDateTime value)
      Writes a timestamp consisting of date and time.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeTimestampWithTimezone

      void writeTimestampWithTimezone(@Nonnull String fieldName, @Nonnull OffsetDateTime value)
      Writes a timestamp with timezone consisting of date, time and timezone offset.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeCompact

      <T> void writeCompact(@Nonnull String fieldName, @Nullable T value)
      Writes a nested compact object.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfBoolean

      void writeArrayOfBoolean(@Nonnull String fieldName, @Nullable boolean[] value)
      Writes an array of booleans.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfInt8

      void writeArrayOfInt8(@Nonnull String fieldName, @Nullable byte[] value)
      Writes an array of 8-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfInt16

      void writeArrayOfInt16(@Nonnull String fieldName, @Nullable short[] value)
      Writes an array of 16-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfInt32

      void writeArrayOfInt32(@Nonnull String fieldName, @Nullable int[] value)
      Writes an array of 32-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfInt64

      void writeArrayOfInt64(@Nonnull String fieldName, @Nullable long[] value)
      Writes an array of 64-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfFloat32

      void writeArrayOfFloat32(@Nonnull String fieldName, @Nullable float[] value)
      Writes an array of 32-bit IEEE 754 floating point numbers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfFloat64

      void writeArrayOfFloat64(@Nonnull String fieldName, @Nullable double[] value)
      Writes an array of 64-bit IEEE 754 floating point numbers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfString

      void writeArrayOfString(@Nonnull String fieldName, @Nullable String[] value)
      Writes an array of UTF-8 encoded strings.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfDecimal

      void writeArrayOfDecimal(@Nonnull String fieldName, @Nullable BigDecimal[] value)
      Writes an array of arbitrary precision and scale floating point numbers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfTime

      void writeArrayOfTime(@Nonnull String fieldName, @Nullable LocalTime[] value)
      Writes an array of times consisting of hour, minute, second, and nanoseconds.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfDate

      void writeArrayOfDate(@Nonnull String fieldName, @Nullable LocalDate[] value)
      Writes an array of dates consisting of year, month, and day.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfTimestamp

      void writeArrayOfTimestamp(@Nonnull String fieldName, @Nullable LocalDateTime[] value)
      Writes an array of timestamps consisting of date and time.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfTimestampWithTimezone

      void writeArrayOfTimestampWithTimezone(@Nonnull String fieldName, @Nullable OffsetDateTime[] value)
      Writes an array of timestamps with timezone consisting of date, time and timezone offset.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfCompact

      <T> void writeArrayOfCompact(@Nonnull String fieldName, @Nullable T[] value)
      Writes an array of nested compact objects.

      It is not allowed to write an array containing different item types or a HazelcastSerializationException will be thrown.

      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableBoolean

      void writeNullableBoolean(@Nonnull String fieldName, @Nullable Boolean value)
      Writes a nullable boolean.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableInt8

      void writeNullableInt8(@Nonnull String fieldName, @Nullable Byte value)
      Writes a nullable 8-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableInt16

      void writeNullableInt16(@Nonnull String fieldName, @Nullable Short value)
      Writes a nullable 16-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableInt32

      void writeNullableInt32(@Nonnull String fieldName, @Nullable Integer value)
      Writes a nullable 32-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableInt64

      void writeNullableInt64(@Nonnull String fieldName, @Nullable Long value)
      Writes a nullable 64-bit two's complement signed integer.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableFloat32

      void writeNullableFloat32(@Nonnull String fieldName, @Nullable Float value)
      Writes a nullable 32-bit IEEE 754 floating point number.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeNullableFloat64

      void writeNullableFloat64(@Nonnull String fieldName, @Nullable Double value)
      Writes a nullable 64-bit IEEE 754 floating point number.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableBoolean

      void writeArrayOfNullableBoolean(@Nonnull String fieldName, @Nullable Boolean[] value)
      Writes a nullable array of nullable booleans.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableInt8

      void writeArrayOfNullableInt8(@Nonnull String fieldName, @Nullable Byte[] value)
      Writes a nullable array of nullable 8-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableInt16

      void writeArrayOfNullableInt16(@Nonnull String fieldName, @Nullable Short[] value)
      Writes a nullable array of nullable 16-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableInt32

      void writeArrayOfNullableInt32(@Nonnull String fieldName, @Nullable Integer[] value)
      Writes a nullable array of nullable 32-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableInt64

      void writeArrayOfNullableInt64(@Nonnull String fieldName, @Nullable Long[] value)
      Writes a nullable array of nullable 64-bit two's complement signed integers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableFloat32

      void writeArrayOfNullableFloat32(@Nonnull String fieldName, @Nullable Float[] value)
      Writes a nullable array of nullable 32-bit IEEE 754 floating point numbers.
      Parameters:
      fieldName - name of the field.
      value - to be written.
    • writeArrayOfNullableFloat64

      void writeArrayOfNullableFloat64(@Nonnull String fieldName, @Nullable Double[] value)
      Writes a nullable array of nullable 64-bit IEEE 754 floating point numbers.
      Parameters:
      fieldName - name of the field.
      value - to be written.