Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify ClientConnectionManagerImpl
This commit simplifies the concurrency and state machine logic of ClientConnectionManagerImpl. First, a simple mutex is defined and used for the management of connections and client state and races are prevented during state updates. Second, the possible client states and their transitions are clarified. On bootstrap, a client starts with the INITIAL state and moves to the INITIALIZED_ON_CLUSTER state once it makes its first connection to any member. Then, whenever this client drops all its connections to the current cluster and connects to a totally new cluster, it moves to the CONNECTED_TO_CLUSTER state. Then, the client moves back to the INITIALIZED_ON_CLUSTER state once it propagates its local state to the new cluster. Fixes hazelcast#16288
- Loading branch information