@API(value=MAINTAINED) public static enum AtomicMutation.Standard extends Enum<AtomicMutation.Standard> implements AtomicMutation
AtomicMutation.Standard
Enum Constant and Description |
---|
COUNT |
COUNT_NOT_NULL |
COUNT_UPDATES |
MAX_EVER_LONG |
MAX_EVER_TUPLE |
MAX_EVER_VERSION |
MIN_EVER_LONG |
MIN_EVER_TUPLE |
SUM_LONG |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsNegative()
Determine whether this type allows negative values.
|
static long |
decodeSignedLong(byte[] bytes) |
static long |
decodeUnsignedLong(byte[] bytes) |
static byte[] |
encodeSignedLong(long value) |
static byte[] |
encodeUnsignedLong(long value) |
BiFunction<Tuple,Tuple,Tuple> |
getAggregator()
Get a function to aggregate multiple index entries.
|
Tuple |
getIdentity()
Get the initial value for aggregating multiple index entries.
|
byte[] |
getMutationParam(IndexEntry entry,
boolean remove)
Get the underlying argument to the FDB API.
|
MutationType |
getMutationType()
Get the underlying mutation performed by the FDB API.
|
boolean |
hasLongValue()
Determine whether this type aggregates long (integer) values.
|
boolean |
hasSingleValue()
Determine whether this type aggregates exactly one value.
|
boolean |
hasValues()
Determine whether this type aggregates values (as opposed to something like counting records).
|
boolean |
isIdempotent()
Determine whether this type is idempotent.
|
static AtomicMutation.Standard |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AtomicMutation.Standard[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AtomicMutation.Standard COUNT
public static final AtomicMutation.Standard COUNT_UPDATES
public static final AtomicMutation.Standard COUNT_NOT_NULL
public static final AtomicMutation.Standard SUM_LONG
public static final AtomicMutation.Standard MAX_EVER_TUPLE
public static final AtomicMutation.Standard MIN_EVER_TUPLE
public static final AtomicMutation.Standard MAX_EVER_LONG
public static final AtomicMutation.Standard MIN_EVER_LONG
public static final AtomicMutation.Standard MAX_EVER_VERSION
public static AtomicMutation.Standard[] values()
for (AtomicMutation.Standard c : AtomicMutation.Standard.values()) System.out.println(c);
public static AtomicMutation.Standard valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nonnull public MutationType getMutationType()
AtomicMutation
getMutationType
in interface AtomicMutation
@Nullable public byte[] getMutationParam(IndexEntry entry, boolean remove)
AtomicMutation
getMutationParam
in interface AtomicMutation
entry
- the Tuple
form of the value being stored into the indexremove
- true
if the entry is being removed from the indexnull
to do nothing for this mutation@Nonnull public static byte[] encodeUnsignedLong(long value)
public static long decodeUnsignedLong(byte[] bytes)
@Nonnull public static byte[] encodeSignedLong(long value)
public static long decodeSignedLong(byte[] bytes)
@Nonnull public BiFunction<Tuple,Tuple,Tuple> getAggregator()
AtomicMutation
getAggregator
in interface AtomicMutation
RecordCursor.reduce(U, java.util.function.BiFunction<U, ? super T, U>)
@Nullable public Tuple getIdentity()
AtomicMutation
getIdentity
in interface AtomicMutation
RecordCursor.reduce(U, java.util.function.BiFunction<U, ? super T, U>)
public boolean isIdempotent()
AtomicMutation
isIdempotent
in interface AtomicMutation
true
if updating the index multiple times with the same value yields the same resultpublic boolean hasValues()
AtomicMutation
GroupingKeyExpression
.hasValues
in interface AtomicMutation
true
if values are allowedpublic boolean hasSingleValue()
AtomicMutation
hasSingleValue
in interface AtomicMutation
true
if only a single value is allowedpublic boolean hasLongValue()
AtomicMutation
hasLongValue
in interface AtomicMutation
true
if only a long value is allowedpublic boolean allowsNegative()
AtomicMutation
allowsNegative
in interface AtomicMutation
true
if negative values are allowed