eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.26k stars 2.07k forks source link

Decouple the cluster manager interface from NodeSelector and make this class an implementation details #5312

Closed vietj closed 1 week ago

vietj commented 2 weeks ago

Motivation:

The NodeSelector interface has currently a single implementation and is exposed to the cluster manager. The NodeSelector interface combines two API, an API selecting node used by the event bus, an API for broadcasting changes to the node selector implementation used by the cluster manager. The cluster manager exposed API should be reduced to the methods it is intended to use, this also allows to reduce the SPI surface of the cluster manager SPI.

Changes:

Extract the RegistrationListener out of NodeSelector, the ClusterManager interface gets getter/setter for the registration listener, similar to the NodeListener.

The NodeSelector is moved to the cluster manager SPI impl package and is not exposed anymore.

This is an SPI breaking change.