Class Event.MigrationOp

  • Enclosing class:
    Event

    public static final class Event.MigrationOp
    extends Event
    An event generated by a migration operation.
    • 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 milliseconds
        context - the context associated with the event
        featureKey - the flag key
        variation - the result variation, or -1 if there was an error
        flagVersion - the flag version, or -1 if the flag was not found
        value - the result value
        defaultVal - the default value passed by the application
        reason - the evaluation reason, if it is to be included in the event
        samplingRatio - the sampling ratio for this event
        operation - the operation for the event
        invokedMeasurement - measurement containing which origins were invoked
        consistencyMeasurement - measurement containing results of a consistency check, or null if no check was done
        latencyMeasurement - measurement containing the execution latencies of invoked methods, or null if no check was done
        errorMeasurement - 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()
        The EvaluationReason for this evaluation, or null if the reason was not requested for this evaluation.
        Returns:
        a reason object or null
      • getSamplingRatio

        public long getSamplingRatio()
        Get the sampling ratio for this event.
        Overrides:
        getSamplingRatio in class Event
        Returns:
        the sampling ratio
      • getOperation

        public java.lang.String getOperation()
        Get the migration operation for this event.
        Returns:
        the migration operation