Class Event.MigrationOp
- java.lang.Object
-
- com.launchdarkly.sdk.internal.events.Event
-
- com.launchdarkly.sdk.internal.events.Event.MigrationOp
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Event.MigrationOp.ConsistencyMeasurement
Measurement used to indicate if the values in a read operation were consistent.static class
Event.MigrationOp.ErrorMeasurement
Error measurement for a migration operation.static class
Event.MigrationOp.InvokedMeasurement
Invoked measurement for a migration op.static class
Event.MigrationOp.LatencyMeasurement
Latency measurement for a migration operation.-
Nested classes/interfaces inherited from class com.launchdarkly.sdk.internal.events.Event
Event.Custom, Event.FeatureRequest, Event.Identify, Event.Index, Event.MigrationOp
-
-
Constructor Summary
Constructors Constructor Description MigrationOp(long timestamp, com.launchdarkly.sdk.LDContext context, java.lang.String featureKey, int variation, int flagVersion, com.launchdarkly.sdk.LDValue value, com.launchdarkly.sdk.LDValue defaultVal, com.launchdarkly.sdk.EvaluationReason reason, long samplingRatio, java.lang.String operation, Event.MigrationOp.InvokedMeasurement invokedMeasurement, Event.MigrationOp.ConsistencyMeasurement consistencyMeasurement, Event.MigrationOp.LatencyMeasurement latencyMeasurement, Event.MigrationOp.ErrorMeasurement errorMeasurement)
Construct a new migration operation event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event.MigrationOp.ConsistencyMeasurement
getConsistencyMeasurement()
Get theEvent.MigrationOp.ConsistencyMeasurement
for this operation.com.launchdarkly.sdk.LDValue
getDefaultVal()
The application default value used in the evaluation.Event.MigrationOp.ErrorMeasurement
getErrorMeasurement()
TheEvent.MigrationOp.ErrorMeasurement
for this operation.java.lang.String
getFeatureKey()
The key of the feature flag that was evaluated.int
getFlagVersion()
The version of the feature flag that was evaluated, or -1 if the flag was not found.Event.MigrationOp.InvokedMeasurement
getInvokedMeasurement()
TheEvent.MigrationOp.InvokedMeasurement
for this operation.Event.MigrationOp.LatencyMeasurement
getLatencyMeasurement()
TheEvent.MigrationOp.LatencyMeasurement
for this operation.java.lang.String
getOperation()
Get the migration operation for this event.com.launchdarkly.sdk.EvaluationReason
getReason()
TheEvaluationReason
for this evaluation, or null if the reason was not requested for this evaluation.long
getSamplingRatio()
Get the sampling ratio for this event.com.launchdarkly.sdk.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.-
Methods inherited from class com.launchdarkly.sdk.internal.events.Event
getContext, getCreationDate
-
-
-
-
Constructor Detail
-
MigrationOp
public MigrationOp(long timestamp, @NotNull com.launchdarkly.sdk.LDContext context, @NotNull java.lang.String featureKey, int variation, int flagVersion, @NotNull com.launchdarkly.sdk.LDValue value, @NotNull com.launchdarkly.sdk.LDValue defaultVal, @Nullable com.launchdarkly.sdk.EvaluationReason reason, long samplingRatio, @NotNull java.lang.String operation, @NotNull Event.MigrationOp.InvokedMeasurement invokedMeasurement, @Nullable Event.MigrationOp.ConsistencyMeasurement consistencyMeasurement, @Nullable Event.MigrationOp.LatencyMeasurement latencyMeasurement, @Nullable Event.MigrationOp.ErrorMeasurement errorMeasurement)
Construct a new migration operation event.- Parameters:
timestamp
- the timestamp in millisecondscontext
- the context associated with the eventfeatureKey
- the flag keyvariation
- the result variation, or -1 if there was an errorflagVersion
- the flag version, or -1 if the flag was not foundvalue
- the result valuedefaultVal
- the default value passed by the applicationreason
- the evaluation reason, if it is to be included in the eventsamplingRatio
- the sampling ratio for this eventoperation
- the operation for the eventinvokedMeasurement
- measurement containing which origins were invokedconsistencyMeasurement
- measurement containing results of a consistency check, or null if no check was donelatencyMeasurement
- measurement containing the execution latencies of invoked methods, or null if no check was doneerrorMeasurement
- measurement reporting any errors, or null if no errors were encountered
-
-
Method Detail
-
getFeatureKey
@NotNull public java.lang.String getFeatureKey()
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
-
getFlagVersion
public int getFlagVersion()
The version of the feature flag that was evaluated, or -1 if the flag was not found.- Returns:
- the flag version or -1
-
getValue
@NotNull public com.launchdarkly.sdk.LDValue getValue()
The value of the selected flag variation.- Returns:
- the value
-
getDefaultVal
@NotNull public com.launchdarkly.sdk.LDValue getDefaultVal()
The application default value used in the evaluation.- Returns:
- the application default
-
getReason
@Nullable public com.launchdarkly.sdk.EvaluationReason getReason()
TheEvaluationReason
for this evaluation, or null if the reason was not requested for this evaluation.- Returns:
- a reason object or null
-
getInvokedMeasurement
@NotNull public Event.MigrationOp.InvokedMeasurement getInvokedMeasurement()
TheEvent.MigrationOp.InvokedMeasurement
for this operation.- Returns:
- the invoked measurement
-
getLatencyMeasurement
@Nullable public Event.MigrationOp.LatencyMeasurement getLatencyMeasurement()
TheEvent.MigrationOp.LatencyMeasurement
for this operation.- Returns:
- the latency measurement or null
-
getErrorMeasurement
@Nullable public Event.MigrationOp.ErrorMeasurement getErrorMeasurement()
TheEvent.MigrationOp.ErrorMeasurement
for this operation.- Returns:
- the error measurement or null
-
getConsistencyMeasurement
@Nullable public Event.MigrationOp.ConsistencyMeasurement getConsistencyMeasurement()
Get theEvent.MigrationOp.ConsistencyMeasurement
for this operation.- Returns:
- the consistency measurement or null
-
getSamplingRatio
public long getSamplingRatio()
Get the sampling ratio for this event.- Overrides:
getSamplingRatio
in classEvent
- Returns:
- the sampling ratio
-
getOperation
public java.lang.String getOperation()
Get the migration operation for this event.- Returns:
- the migration operation
-
-