Enum AtomicMutation.Standard

    • Method Detail

      • values

        public static AtomicMutation.Standard[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AtomicMutation.Standard c : AtomicMutation.Standard.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AtomicMutation.Standard valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getMutationParam

        @Nullable
        public byte[] getMutationParam​(IndexEntry entry,
                                       boolean remove)
        Description copied from interface: AtomicMutation
        Get the underlying argument to the FDB API.
        Specified by:
        getMutationParam in interface AtomicMutation
        Parameters:
        entry - 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
      • encodeUnsignedLong

        @Nonnull
        public static byte[] encodeUnsignedLong​(long value)
      • decodeUnsignedLong

        public static long decodeUnsignedLong​(byte[] bytes)
      • encodeSignedLong

        @Nonnull
        public static byte[] encodeSignedLong​(long value)
      • decodeSignedLong

        public static long decodeSignedLong​(byte[] bytes)
      • isIdempotent

        public boolean isIdempotent()
        Description copied from interface: AtomicMutation
        Determine whether this type is idempotent. Max and min type operations are idempotent; sum and count type operations are not.
        Specified by:
        isIdempotent in interface AtomicMutation
        Returns:
        true if updating the index multiple times with the same value yields the same result
      • hasValues

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

        public boolean hasSingleValue()
        Description copied from interface: AtomicMutation
        Determine whether this type aggregates exactly one value.
        Specified by:
        hasSingleValue in interface AtomicMutation
        Returns:
        true if only a single value is allowed
      • hasLongValue

        public boolean hasLongValue()
        Description copied from interface: AtomicMutation
        Determine whether this type aggregates long (integer) values.
        Specified by:
        hasLongValue in interface AtomicMutation
        Returns:
        true if only a long value is allowed
      • allowsNegative

        public boolean allowsNegative()
        Description copied from interface: AtomicMutation
        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.
        Specified by:
        allowsNegative in interface AtomicMutation
        Returns:
        true if negative values are allowed
      • getCompareAndClearParam

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