Interface EndpointReconciler
- All Known Implementing Classes:
EndpointRegistry
public interface EndpointReconciler
-
Method Summary
Modifier and TypeMethodDescriptionreconcile(EndpointGateway virtualClusterModel, Map<Integer, HostPort> upstreamNodes) Reconciles the existing set endpoints for this virtual cluster against those required for the current set of nodes for this virtual cluster.upstreamAddress(EndpointGateway gateway, int upstreamNodeId) Returns the upstream address for the given upstream node ID (note this may be a physical node id, or a virtual node id if routing enabled), as last reconciled for the virtual cluster identified bygateway.
-
Method Details
-
reconcile
CompletionStage<Void> reconcile(EndpointGateway virtualClusterModel, Map<Integer, HostPort> upstreamNodes) Reconciles the existing set endpoints for this virtual cluster against those required for the current set of nodes for this virtual cluster. Once any necessary alterations to the endpoint bindings have been realised, the returned CompletionStage will be completed.- Parameters:
virtualClusterModel- virtual clusterupstreamNodes- current set of node ids (note these may be physical node ids, or a virtual node ids if routing enabled),- Returns:
- CompletionStage that is used to signal completion of the work.
-
upstreamAddress
Returns the upstream address for the given upstream node ID (note this may be a physical node id, or a virtual node id if routing enabled), as last reconciled for the virtual cluster identified bygateway. Returns empty if the address is not yet known.- Parameters:
gateway- the virtual cluster's endpoint gatewayupstreamNodeId- the upstream node ID- Returns:
- the upstream host and port, or empty if not yet known
-