Skip to content

Commit

Permalink
Introduce minor fixes before 5.2.0 (#620)
Browse files Browse the repository at this point in the history
- Updated the Hazelcast version used in README and examples to 5.2
- Renamed CompactSerializableClass to CompactSerializableType to
be more consistent with the other type-var definitions.
  • Loading branch information
mdumandag authored Mar 28, 2023
1 parent 15c77bb commit d6090fc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ images <https://hub.docker.com/r/hazelcast/hazelcast/>`__.

.. code:: bash
docker run -p 5701:5701 hazelcast/hazelcast:5.1
docker run -p 5701:5701 hazelcast/hazelcast:5.2
You can also use our ZIP or TAR
`distributions <https://hazelcast.com/open-source-projects/downloads/>`__.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ There are following options to start a Hazelcast cluster easily:

.. code:: bash
docker run -p 5701:5701 hazelcast/hazelcast:5.1
docker run -p 5701:5701 hazelcast/hazelcast:5.2
- You can use `Hazelcast CLI
<https://docs.hazelcast.com/hazelcast/latest/getting-started/install-hazelcast#using-a-package-manager>`__.
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ How to try these examples
* If not, you can use our official Docker images to start a member.

```bash
docker run -p 5701:5701 hazelcast/hazelcast:5.1
docker run -p 5701:5701 hazelcast/hazelcast:5.2
```
To see the other ways to start Hazelcast members, see
[Working with Hazelcast Clusters](https://hazelcast.readthedocs.io/en/stable/getting_started.html#working-with-hazelcast-clusters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"cell_type": "markdown",
"source": [
"Here is the critical part. We will insert the data from TMDB API to our Hazelcast Cluster. You can do this in two way. Firstly, you can get a map by calling `hazelcast.get_map()` method and use `put()`, `remove()` and other methods of the returned distributed map object. Secondly you can create a mapping for your data schema using SQL syntax and it directly creates both map and mapping. We preferred second way to show SQL functions in this notebook. \n",
"</br></br>In the mapping query, you should sepicfy the fields of data schema. It can be both primitive types or complex types. Using this mapping, we will execute SQL queries on our maps. You can select any column you want to map; not all fields are mandatory. For more information about mapping, you can visit https://docs.hazelcast.com/hazelcast/5.1/sql/mapping-to-maps\n",
"</br></br>In the mapping query, you should sepicfy the fields of data schema. It can be both primitive types or complex types. Using this mapping, we will execute SQL queries on our maps. You can select any column you want to map; not all fields are mandatory. For more information about mapping, you can visit https://docs.hazelcast.com/hazelcast/5.2/sql/mapping-to-maps\n",
"</br></br>\n",
"Now, execute following cells to create mappings to execute SQL queries against your data."
],
Expand Down
2 changes: 1 addition & 1 deletion examples/paging-predicate/member-with-comparator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<version>5.1.3</version>
<version>5.2.3</version>
</dependency>
</dependencies>

Expand Down
14 changes: 7 additions & 7 deletions hazelcast/serialization/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2594,22 +2594,22 @@ def write_array_of_compact(
"""


CompactSerializableClass = typing.TypeVar("CompactSerializableClass")
CompactSerializableType = typing.TypeVar("CompactSerializableType")
"""Type of the Compact serializable classes."""


class CompactSerializer(typing.Generic[CompactSerializableClass], abc.ABC):
class CompactSerializer(typing.Generic[CompactSerializableType], abc.ABC):
"""Defines the contract of the serializers used for Compact serialization.
After defining a serializer for the objects of the class
:const:`CompactSerializableClass`, the serializer can be registered to the
:const:`CompactSerializableType`, the serializer can be registered to the
:attr:`hazelcast.config.Config.compact_serializers`.
:func:`write` and :func:`read` methods must be consistent with each other.
"""

@abc.abstractmethod
def read(self, reader: CompactReader) -> CompactSerializableClass:
def read(self, reader: CompactReader) -> CompactSerializableType:
"""Deserializes the object from the reader.
Args:
Expand All @@ -2624,7 +2624,7 @@ def read(self, reader: CompactReader) -> CompactSerializableClass:
"""

@abc.abstractmethod
def write(self, writer: CompactWriter, obj: CompactSerializableClass) -> None:
def write(self, writer: CompactWriter, obj: CompactSerializableType) -> None:
"""Serializes the object to writer.
Args:
Expand All @@ -2637,7 +2637,7 @@ def write(self, writer: CompactWriter, obj: CompactSerializableClass) -> None:
"""

@abc.abstractmethod
def get_class(self) -> typing.Type[CompactSerializableClass]:
def get_class(self) -> typing.Type[CompactSerializableType]:
"""Returns the class that this serializer reads or writes.
Returns:
Expand All @@ -2647,7 +2647,7 @@ def get_class(self) -> typing.Type[CompactSerializableClass]:
@abc.abstractmethod
def get_type_name(self) -> str:
"""Returns the unique type name associated with
:const`CompactSerializableClass`.
:const`CompactSerializableType`.
If the class is ever evolved by adding or removing fields,
the type name for the evolved serializers must be the same
Expand Down

0 comments on commit d6090fc

Please sign in to comment.