Class Event.FeatureRequest
- java.lang.Object
-
- com.launchdarkly.sdk.internal.events.Event
-
- com.launchdarkly.sdk.internal.events.Event.FeatureRequest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.launchdarkly.sdk.internal.events.Event
Event.Custom, Event.FeatureRequest, Event.Identify, Event.Index
-
-
Constructor Summary
Constructors Constructor Description FeatureRequest(long timestamp, java.lang.String key, com.launchdarkly.sdk.LDContext context, int version, int variation, com.launchdarkly.sdk.LDValue value, com.launchdarkly.sdk.LDValue defaultVal, com.launchdarkly.sdk.EvaluationReason reason, java.lang.String prereqOf, boolean trackEvents, java.lang.Long debugEventsUntilDate, boolean debug)Constructs a feature request event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.LonggetDebugEventsUntilDate()If debugging is enabled for this flag, the Unix millisecond time at which to stop debugging.com.launchdarkly.sdk.LDValuegetDefaultVal()The application default value used in the evaluation.java.lang.StringgetKey()The key of the feature flag that was evaluated.java.lang.StringgetPrereqOf()If this flag was evaluated as a prerequisite for another flag, the key of the other flag.com.launchdarkly.sdk.EvaluationReasongetReason()TheEvaluationReasonfor this evaluation, or null if the reason was not requested for this evaluation.com.launchdarkly.sdk.LDValuegetValue()The value of the selected flag variation.intgetVariation()The index of the selected flag variation, or -1 if the application default value was used.intgetVersion()The version of the feature flag that was evaluated, or -1 if the flag was not found.booleanisDebug()True if this event was generated due to debugging being enabled.booleanisTrackEvents()True if full event tracking is enabled for this flag.Event.FeatureRequesttoDebugEvent()Creates a debug event with the same properties as this event.-
Methods inherited from class com.launchdarkly.sdk.internal.events.Event
getContext, getCreationDate
-
-
-
-
Constructor Detail
-
FeatureRequest
public FeatureRequest(long timestamp, java.lang.String key, com.launchdarkly.sdk.LDContext context, int version, int variation, com.launchdarkly.sdk.LDValue value, com.launchdarkly.sdk.LDValue defaultVal, com.launchdarkly.sdk.EvaluationReason reason, java.lang.String prereqOf, boolean trackEvents, java.lang.Long debugEventsUntilDate, boolean debug)Constructs a feature request event.- Parameters:
timestamp- the timestamp in millisecondskey- the flag keycontext- the context associated with the eventversion- the flag version, or -1 if the flag was not foundvariation- the result variation, or -1 if there was an errorvalue- the result valuedefaultVal- the default value passed by the applicationreason- the evaluation reason, if it is to be included in the eventprereqOf- if this flag was evaluated as a prerequisite, this is the key of the flag that referenced ittrackEvents- true if full event tracking is turned on for this flagdebugEventsUntilDate- if non-null, the time until which event debugging should be enableddebug- true if this is a debugging event
-
-
Method Detail
-
getKey
public java.lang.String getKey()
The key of the feature flag that was evaluated.- Returns:
- the flag key
-
getVariation
public int getVariation()
The index of the selected flag variation, or -1 if the application default value was used.- Returns:
- zero-based index of the variation, or -1
-
getValue
public com.launchdarkly.sdk.LDValue getValue()
The value of the selected flag variation.- Returns:
- the value
-
getDefaultVal
public com.launchdarkly.sdk.LDValue getDefaultVal()
The application default value used in the evaluation.- Returns:
- the application default
-
getVersion
public int getVersion()
The version of the feature flag that was evaluated, or -1 if the flag was not found.- Returns:
- the flag version or null
-
getPrereqOf
public java.lang.String getPrereqOf()
If this flag was evaluated as a prerequisite for another flag, the key of the other flag.- Returns:
- a flag key or null
-
isTrackEvents
public boolean isTrackEvents()
True if full event tracking is enabled for this flag.- Returns:
- true if full event tracking is on
-
getDebugEventsUntilDate
public java.lang.Long getDebugEventsUntilDate()
If debugging is enabled for this flag, the Unix millisecond time at which to stop debugging.- Returns:
- a timestamp or null
-
getReason
public com.launchdarkly.sdk.EvaluationReason getReason()
TheEvaluationReasonfor this evaluation, or null if the reason was not requested for this evaluation.- Returns:
- a reason object or null
-
isDebug
public boolean isDebug()
True if this event was generated due to debugging being enabled.- Returns:
- true if this is a debug event
-
toDebugEvent
public Event.FeatureRequest toDebugEvent()
Creates a debug event with the same properties as this event.- Returns:
- a debug event
-
-