Interface IDispatchTarget


public interface IDispatchTarget
The physical dispatch target for one region slice of a send: which iiziServer should perform the actual delivery for the subscriptions in that slice, and whether it is this server or a remote peer.

This is the output of IRemoteDispatchSelector and the second flow of Layer 2. It embodies the two-level routing separation: this interface names the region-level destination (residency routing, which the push subsystem owns), and leaves intra-region server placement (load routing, which the load balancer owns) to the destination region itself.

Author:
IIZI
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the server-bound region node that will serve this slice, selected by bounded fallback within the slice's residency ceiling.
    boolean
    Reports whether the serving node is this server.
    boolean
    Reports whether the serving region is currently reachable.
  • Method Details

    • getServingNode

      IRegionNode getServingNode()
      Gets the server-bound region node that will serve this slice, selected by bounded fallback within the slice's residency ceiling.
      Returns:
      The serving region node; never null.
    • isLocal

      boolean isLocal()
      Reports whether the serving node is this server.

      A local target is handled by this server's own send path; a remote target is dispatched to a peer over the server-to-server channel, and its reply is gathered asynchronously. A single-server deployment always yields local targets, which is how the dispatcher-shaped design collapses cleanly to the non-distributed case with no interface change.

      Returns:
      true if this server serves the slice.
    • isReachable

      boolean isReachable()
      Reports whether the serving region is currently reachable.

      If a remote region's server is unreachable, its slice is not dispatched but spooled for that region and reported DeliveryOutcome.REGION_UNREACHABLE; it is replayed when the region returns.

      Returns:
      true if the serving region can be dispatched to now.