Class HpSelector

java.lang.Object
org.j7m.middleware.ha.HpSelector

public final class HpSelector extends Object
Phase 2 high-performance candidate selector.

The selector is stateless and thread-safe. It scores candidates using lease freshness, locality, peer health, latency, success rate, load, and deterministic near-equal tie breaking.

  • Constructor Details

    • HpSelector

      public HpSelector()
      Creates a selector with the default Phase 2 scoring weights.
  • Method Details

    • select

      public HpSelection select(List<org.j7m.middleware.api.ObjectRef> candidates, String localRuntimeId, List<org.j7m.middleware.registry.api.RegistryPeerStatus> peers, InvocationStatsView stats, Clock clock)
      Selects the best candidate.
      Parameters:
      candidates - candidate references
      localRuntimeId - local runtime id
      peers - registry peers
      stats - statistics view
      clock - scoring clock
      Returns:
      selected candidate and scores