Class CanaryRouter
java.lang.Object
org.j7m.middleware.cluster.CanaryRouter
Deterministic bounded identity routing; no request payload or identity is retained or exported.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intSelects a release bucket from a scope, policy revision and stable request identity.static StringSelects a stable node from an already sorted, nonempty bounded eligible set.
-
Method Details
-
bucket
Selects a release bucket from a scope, policy revision and stable request identity.- Parameters:
scope- authenticated routing namespacerevision- policy revisionrequestId- stable application identity, at most 512 characters- Returns:
- bucket in 0..9999
- Throws:
IllegalArgumentException- for invalid identities or revision
-
node
Selects a stable node from an already sorted, nonempty bounded eligible set.- Parameters:
scope- authenticated routing namespacerevision- policy revisionrequestId- stable application identityeligible- sorted node identities, 1..64 entries- Returns:
- selected node identity
- Throws:
IllegalArgumentException- for invalid routing inputs
-