Interface LimitAlgorithm.Outcome
- All Known Subinterfaces:
LimitAlgorithm.Outcome.Accepted,LimitAlgorithm.Outcome.Deferred
- Enclosing interface:
LimitAlgorithm
public static interface LimitAlgorithm.Outcome
Represents the outcome of a limit algorithm decision.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBehavior of anLimitAlgorithm.Outcomerepresenting an accepted work item.static interfaceBehavior of anLimitAlgorithm.Outcomerepresenting a deferred decision.static enumDisposition of the work item.static enumWhen the algorithm made its decision relative to the moment when it was asked about a particular work item. -
Method Summary
Modifier and TypeMethodDescriptionName of the limit algorithm which decided whether to allow or prevent processing of the work item.static LimitAlgorithm.OutcomedeferredAcceptance(String originName, String algorithmType, LimitAlgorithm.Token token, long waitStartNanos, long waitEndNanos) Creates a newLimitAlgorithm.Outcomerepresenting a deferred acceptance of a work item.static LimitAlgorithm.OutcomedeferredRejection(String originName, String algorithmType, long waitStartNanos, long waitEndNanos) Creates a newLimitAlgorithm.Outcomerepresenting a deferred rejection of a work item.TheLimitAlgorithm.Outcome.Dispositionof the work item.static LimitAlgorithm.OutcomeimmediateAcceptance(String originName, String algorithmType, LimitAlgorithm.Token token) Creates a newLimitAlgorithm.Outcomerepresenting an immediate acceptance of a work item.static LimitAlgorithm.OutcomeimmediateRejection(String originName, String algorithmType) Creates a newLimitAlgorithm.Outcomerepresenting an immediate rejection of a work item.Origin (e.g., socket name) of the work item.timing()TheLimitAlgorithm.Outcome.Timingof the decision about the work item.
-
Method Details
-
immediateAcceptance
static LimitAlgorithm.Outcome immediateAcceptance(String originName, String algorithmType, LimitAlgorithm.Token token) Creates a newLimitAlgorithm.Outcomerepresenting an immediate acceptance of a work item.- Parameters:
originName- origin namealgorithmType- algorithm typetoken-LimitAlgorithm.Token- Returns:
- immediate acceptance outcome
-
deferredAcceptance
static LimitAlgorithm.Outcome deferredAcceptance(String originName, String algorithmType, LimitAlgorithm.Token token, long waitStartNanos, long waitEndNanos) Creates a newLimitAlgorithm.Outcomerepresenting a deferred acceptance of a work item.- Parameters:
originName- origin namealgorithmType- algorithm typetoken-LimitAlgorithm.TokenwaitStartNanos- start time of the wait for the decisionwaitEndNanos- end time of the wait for the decision- Returns:
- deferred acceptance outcome
-
immediateRejection
Creates a newLimitAlgorithm.Outcomerepresenting an immediate rejection of a work item. }- Parameters:
originName- origin namealgorithmType- algorithm type- Returns:
- immediate rejection outcome
-
deferredRejection
static LimitAlgorithm.Outcome deferredRejection(String originName, String algorithmType, long waitStartNanos, long waitEndNanos) Creates a newLimitAlgorithm.Outcomerepresenting a deferred rejection of a work item.- Parameters:
originName- origin namealgorithmType- algorithm typewaitStartNanos- start time of the wait for the decisionwaitEndNanos- end time of the wait for the decision- Returns:
- deferred rejection outcome
-
originName
String originName()Origin (e.g., socket name) of the work item.- Returns:
- origin
-
algorithmType
String algorithmType()Name of the limit algorithm which decided whether to allow or prevent processing of the work item.- Returns:
- algorithm name
-
disposition
LimitAlgorithm.Outcome.Disposition disposition()TheLimitAlgorithm.Outcome.Dispositionof the work item.- Returns:
- disposition
-
timing
LimitAlgorithm.Outcome.Timing timing()TheLimitAlgorithm.Outcome.Timingof the decision about the work item.- Returns:
- timing of the decision
-