Modifier and Type | Class and Description |
---|---|
static class |
Mutation.MutationSerializer |
static class |
Mutation.PartitionUpdateCollector
Collects finalized partition updates
|
static interface |
Mutation.SimpleBuilder
Interface for building mutations geared towards human.
|
Modifier and Type | Field and Description |
---|---|
static Mutation.MutationSerializer |
serializer |
MAX_MUTATION_SIZE
Constructor and Description |
---|
Mutation(PartitionUpdate update) |
Mutation(java.lang.String keyspaceName,
DecoratedKey key,
com.google.common.collect.ImmutableMap<TableId,PartitionUpdate> modifications,
long approxCreatedAtNanos) |
Mutation(java.lang.String keyspaceName,
DecoratedKey key,
com.google.common.collect.ImmutableMap<TableId,PartitionUpdate> modifications,
long approxCreatedAtNanos,
boolean cdcEnabled) |
Modifier and Type | Method and Description |
---|---|
void |
apply() |
void |
apply(boolean durableWrites) |
void |
apply(boolean durableWrites,
boolean isDroppable) |
java.util.concurrent.CompletableFuture<?> |
applyFuture() |
void |
applyUnsafe() |
java.lang.String |
getKeyspaceName() |
PartitionUpdate |
getPartitionUpdate(TableMetadata table) |
com.google.common.collect.ImmutableCollection<PartitionUpdate> |
getPartitionUpdates() |
java.util.Collection<TableId> |
getTableIds() |
long |
getTimeout(java.util.concurrent.TimeUnit unit) |
boolean |
isEmpty() |
DecoratedKey |
key() |
static Mutation |
merge(java.util.List<Mutation> mutations)
Creates a new mutation that merges all the provided mutations.
|
int |
serializedSize(int version) |
static Mutation.SimpleBuilder |
simpleBuilder(java.lang.String keyspaceName,
DecoratedKey partitionKey)
Creates a new simple mutuation builder.
|
int |
smallestGCGS() |
java.lang.String |
toString() |
java.lang.String |
toString(boolean shallow) |
boolean |
trackedByCDC() |
void |
validateSize(int version,
int overhead)
Validates size of mutation does not exceed
DatabaseDescriptor.getMaxMutationSize() . |
Mutation |
without(java.util.Set<TableId> tableIds) |
Mutation |
without(TableId tableId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dataSize, validateIndexedColumns
public static final Mutation.MutationSerializer serializer
public Mutation(PartitionUpdate update)
public Mutation(java.lang.String keyspaceName, DecoratedKey key, com.google.common.collect.ImmutableMap<TableId,PartitionUpdate> modifications, long approxCreatedAtNanos)
public Mutation(java.lang.String keyspaceName, DecoratedKey key, com.google.common.collect.ImmutableMap<TableId,PartitionUpdate> modifications, long approxCreatedAtNanos, boolean cdcEnabled)
public java.lang.String getKeyspaceName()
getKeyspaceName
in interface IMutation
public java.util.Collection<TableId> getTableIds()
getTableIds
in interface IMutation
public DecoratedKey key()
public com.google.common.collect.ImmutableCollection<PartitionUpdate> getPartitionUpdates()
getPartitionUpdates
in interface IMutation
public void validateSize(int version, int overhead)
IMutation
DatabaseDescriptor.getMaxMutationSize()
.validateSize
in interface IMutation
version
- the MessagingService version the mutation is being serialized for.
see MessagingService.current_version
overhead
- overhadd to add for mutation size to validate. Pass zero if not required but not a negative value.public PartitionUpdate getPartitionUpdate(TableMetadata table)
public boolean isEmpty()
public static Mutation merge(java.util.List<Mutation> mutations)
mutations
- the mutations to merge together. All mutation must be
on the same keyspace and partition key. There should also be at least one
mutation.mutations
.java.lang.IllegalArgumentException
- if not all the mutations are on the same
keyspace and key.public java.util.concurrent.CompletableFuture<?> applyFuture()
public void apply(boolean durableWrites, boolean isDroppable)
public void apply(boolean durableWrites)
public void applyUnsafe()
public long getTimeout(java.util.concurrent.TimeUnit unit)
getTimeout
in interface IMutation
public int smallestGCGS()
public boolean trackedByCDC()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean shallow)
public int serializedSize(int version)
public static Mutation.SimpleBuilder simpleBuilder(java.lang.String keyspaceName, DecoratedKey partitionKey)
keyspaceName
- the name of the keyspace this is a mutation for.partitionKey
- the key of partition this if a mutation for.Copyright © 2009-2022 The Apache Software Foundation