Skip to content

Conversation

@mdumandag
Copy link
Contributor

Depends on #217

This PR implements the UuidSerializer as a default serializer.
With this change, objects of uuid.UUID type will be serialized using this serializer and java.util.UUID objects will be converted to that type when received from the server.

Apart from that, this PR includes some other changes.

  • Objects of bytearray type will now be serialized with ByteArraySerializer
  • Some small improvements on the hot path of the to_data function.
  • Removing faulty range checks from IntegerSerializer and LongSerializer. Formerly, we were throwing an exception for -1 << 31 and -1 << 63 values. However, they are valid as Integer or Long. Now, we are relying on the struct package to throw exceptions on out-of-range values.
  • Faulty constant definitions are fixed. (MAX_SHORT, MAX_INT, MAX_LONG) Unused constant definitions are removed. (MAX_FLOAT32, MIN_FLOAT32)
  • Unreachable methods (like JavaClassSerializer.write_data, LinkedListSerializer.write_data etc.) are commented out.
  • BigDecimalSerializer is removed.
  • Implementation of DatetimeSerializer is fixed and made compatible with java.util.Date.
  • The serialization test suite is significantly improved to cover all serializers in various scenarios like set/get from the client, set from the client, get from the remote controller, set on the server, and get from the client.

@mdumandag mdumandag added this to the 4.0 milestone Sep 9, 2020
@mdumandag mdumandag self-assigned this Sep 9, 2020
@mdumandag mdumandag force-pushed the serialization-improvements branch from 9a6f0e9 to e070e70 Compare September 10, 2020 07:17
@mdumandag mdumandag force-pushed the serialization-improvements branch 2 times, most recently from 4e809eb to 79170ff Compare September 24, 2020 07:53
@mdumandag mdumandag force-pushed the serialization-improvements branch from 79170ff to af259be Compare October 5, 2020 07:06
@mdumandag mdumandag merged commit 229774c into hazelcast:master Oct 6, 2020
@mdumandag mdumandag deleted the serialization-improvements branch October 6, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants