Class Event.FeatureRequest
- java.lang.Object
-
- com.launchdarkly.sdk.server.interfaces.Event
-
- com.launchdarkly.sdk.server.interfaces.Event.FeatureRequest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.launchdarkly.sdk.server.interfaces.Event
Event.AliasEvent, Event.Custom, Event.FeatureRequest, Event.Identify, Event.Index
-
-
Constructor Summary
Constructors Constructor Description FeatureRequest(long timestamp, java.lang.String key, LDUser user, int version, int variation, LDValue value, LDValue defaultVal, EvaluationReason reason, java.lang.String prereqOf, boolean trackEvents, long debugEventsUntilDate, boolean debug)
Constructs a feature request event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContextKind()
The context kind of the user that generated this eventlong
getDebugEventsUntilDate()
If debugging is enabled for this flag, the Unix millisecond time at which to stop debugging.LDValue
getDefaultVal()
The application default value used in the evaluation.java.lang.String
getKey()
The key of the feature flag that was evaluated.java.lang.String
getPrereqOf()
If this flag was evaluated as a prerequisite for another flag, the key of the other flag.EvaluationReason
getReason()
TheEvaluationReason
for this evaluation, or null if the reason was not requested for this evaluation.LDValue
getValue()
The value of the selected flag variation.int
getVariation()
The index of the selected flag variation, or -1 if the application default value was used.int
getVersion()
The version of the feature flag that was evaluated, or -1 if the flag was not found.boolean
isDebug()
True if this event was generated due to debugging being enabled.boolean
isTrackEvents()
True if full event tracking is enabled for this flag.-
Methods inherited from class com.launchdarkly.sdk.server.interfaces.Event
getCreationDate, getUser
-
-
-
-
Constructor Detail
-
FeatureRequest
public FeatureRequest(long timestamp, java.lang.String key, LDUser user, int version, int variation, LDValue value, LDValue defaultVal, EvaluationReason reason, java.lang.String prereqOf, boolean trackEvents, long debugEventsUntilDate, boolean debug)
Constructs a feature request event.- Parameters:
timestamp
- the timestamp in millisecondskey
- the flag keyuser
- the user 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- Since:
- 4.8.0
-
-
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 LDValue getValue()
The value of the selected flag variation.- Returns:
- the value
-
getDefaultVal
public 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 long getDebugEventsUntilDate()
If debugging is enabled for this flag, the Unix millisecond time at which to stop debugging.- Returns:
- a timestamp or zero
-
getReason
public EvaluationReason getReason()
TheEvaluationReason
for 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
-
getContextKind
public java.lang.String getContextKind()
The context kind of the user that generated this event- Returns:
- the context kind
-
-