Class HpSelector
java.lang.Object
org.j7m.middleware.ha.HpSelector
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 referenceslocalRuntimeId- local runtime idpeers- registry peersstats- statistics viewclock- scoring clock- Returns:
- selected candidate and scores
-