Interface AtomicMutation

    • Method Detail

      • getMutationType

        @Nonnull
        MutationType getMutationType()
        Get the underlying mutation performed by the FDB API.
        Returns:
        the underlying mutation type
      • getMutationParam

        @Nullable
        byte[] getMutationParam​(IndexEntry value,
                                boolean remove)
        Get the underlying argument to the FDB API.
        Parameters:
        value - the Tuple form of the value being stored into the index
        remove - true if the entry is being removed from the index
        Returns:
        a byte array to pass to the FDB API or null to do nothing for this mutation
      • hasValues

        boolean hasValues()
        Determine whether this type aggregates values (as opposed to something like counting records). The values are specified in the grouped part of the GroupingKeyExpression.
        Returns:
        true if values are allowed
      • hasSingleValue

        boolean hasSingleValue()
        Determine whether this type aggregates exactly one value.
        Returns:
        true if only a single value is allowed
      • hasLongValue

        boolean hasLongValue()
        Determine whether this type aggregates long (integer) values.
        Returns:
        true if only a long value is allowed
      • allowsNegative

        boolean allowsNegative()
        Determine whether this type allows negative values. If negative values are not allowed, an exception is thrown when a record is saved that contains a negative value in the indexed field.
        Returns:
        true if negative values are allowed
      • isIdempotent

        boolean isIdempotent()
        Determine whether this type is idempotent. Max and min type operations are idempotent; sum and count type operations are not.
        Returns:
        true if updating the index multiple times with the same value yields the same result
      • getCompareAndClearParam

        @Nullable
        byte[] getCompareAndClearParam()
        Get a value that causes the index entry to be removed if the result of the mutation matches.
        Returns:
        a byte array to pass to COMPARE_AND_CLEAR or null to do nothing for this mutation