public interface EvaluatorInterface
Modifier and Type | Method and Description |
---|---|
FeatureFlagsState |
allFlagsState(LDContext context,
FlagsStateOption... options)
Evaluates all flags.
|
com.launchdarkly.sdk.server.EvalResultAndFlag |
evalAndFlag(java.lang.String method,
java.lang.String flagKey,
LDContext context,
LDValue defaultValue,
LDValueType requireType,
com.launchdarkly.sdk.server.EvaluationOptions options)
Evaluates the provided flag.
|
com.launchdarkly.sdk.server.EvalResultAndFlag evalAndFlag(java.lang.String method, java.lang.String flagKey, LDContext context, LDValue defaultValue, LDValueType requireType, com.launchdarkly.sdk.server.EvaluationOptions options)
method
- the top level customer facing method that led to this invocationflagKey
- of the flag that will be evaluatedcontext
- to use during the evaluationdefaultValue
- the value that will be returned in the result if an issue prevents the evaluator from
successfully calculating an evaluation result.requireType
- that will be asserted against the evaluator's result. If the assertion fails, the default
value is used in the returned result.options
- that are used to control more specific behavior of the evaluationFeatureFlagsState allFlagsState(LDContext context, FlagsStateOption... options)
It is up to each implementation whether events will be logged during evaluation.
context
- to use during the evaluationoptions
- optional FlagsStateOption
values affecting how the state is computedFeatureFlagsState
object (will never be null; see FeatureFlagsState.isValid()