Interface EndpointReconciler

All Known Implementing Classes:
EndpointRegistry

public interface EndpointReconciler
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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 by gateway.
  • 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 cluster
      upstreamNodes - 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

      Optional<HostPort> 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 by gateway. Returns empty if the address is not yet known.
      Parameters:
      gateway - the virtual cluster's endpoint gateway
      upstreamNodeId - the upstream node ID
      Returns:
      the upstream host and port, or empty if not yet known