@API(value=MAINTAINED) public interface AtomicMutation
AtomicMutationIndexMaintainer
index.Modifier and Type | Interface and Description |
---|---|
static class |
AtomicMutation.Standard
The atomic mutations implemented straightforwardly by the FDB API.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsNegative()
Determine whether this type allows negative values.
|
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 value,
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.
|
@Nonnull MutationType getMutationType()
@Nullable byte[] getMutationParam(IndexEntry value, boolean remove)
value
- 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 BiFunction<Tuple,Tuple,Tuple> getAggregator()
RecordCursor.reduce(U, java.util.function.BiFunction<U, ? super T, U>)
@Nullable Tuple getIdentity()
RecordCursor.reduce(U, java.util.function.BiFunction<U, ? super T, U>)
boolean hasValues()
GroupingKeyExpression
.true
if values are allowedboolean hasSingleValue()
true
if only a single value is allowedboolean hasLongValue()
true
if only a long value is allowedboolean allowsNegative()
true
if negative values are allowedboolean isIdempotent()
true
if updating the index multiple times with the same value yields the same result