hazelcast / hazelcast/hazelcast-python-client
Consider separating client construction and cluster connection
Open
Priority: Low
Source: Internal
Type: Enhancement
- Dominant language
- Python
- Stars
- 116
- Forks
- 78
- Avg merge
- 10d 22h
- Merged PRs (30d)
- 1
Description
Currently `HazelcastClient` tries to connect to the Hazelcast cluster during construction. This is unexpected and probably something we shouldn't do in the constructor.
It would be better to separate client instance construction and cluster connection steps. Something along the lines of
```python
hz = HazelcastClient()
hz.connect()
```
That also gives us the opportunity to assign listeners, etc. after creating the client instance:
```python
hz = HazelcastClient()
hz.add_lifecycle_listener( ... )
# ...
hz.connect()
```
Contributor guide
Assessment
This issue has not been assessed yet.