Class ZooKeeperUpdatingListener

java.lang.Object
com.linecorp.armeria.server.ServerListenerAdapter
com.linecorp.armeria.server.zookeeper.ZooKeeperUpdatingListener
All Implemented Interfaces:
ServerListener

public final class ZooKeeperUpdatingListener extends ServerListenerAdapter
A ServerListener which registers the current Server to ZooKeeper as an ephemeral node. When server stops, or a network partition occurs, the underlying ZooKeeper session will be closed, and the node will be automatically removed. As a result, the clients that use a ZooKeeperEndpointGroup will be notified, and they will update their endpoint list automatically so that they do not attempt to connect to the unreachable servers.