use of org.apache.cassandra.db.virtual.VirtualMutation in project cassandra by apache.
the class SingleTableUpdatesCollector method toMutations.
/**
* Returns a collection containing all the mutations.
* @return a collection containing all the mutations.
*/
public List<IMutation> toMutations() {
List<IMutation> ms = new ArrayList<>(puBuilders.size());
for (PartitionUpdate.Builder builder : puBuilders.values()) {
IMutation mutation;
if (metadata.isVirtual())
mutation = new VirtualMutation(builder.build());
else if (metadata.isCounter())
mutation = new CounterMutation(new Mutation(builder.build()), counterConsistencyLevel);
else
mutation = new Mutation(builder.build());
mutation.validateIndexedColumns();
ms.add(mutation);
}
return ms;
}
Aggregations