Class MutationMap
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.cassandra.thrift.MutationMap
-
@NotThreadSafe public class MutationMap extends Object
-
-
Constructor Summary
Constructors Constructor Description MutationMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMutationForCell(com.palantir.atlasdb.keyvalue.api.Cell cell, com.palantir.atlasdb.keyvalue.api.TableReference tableRef, org.apache.cassandra.thrift.Mutation mutation)
Adds the given mutation of the given cell for the given tableRef.Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>>
toMap()
Gets the MutationMap's internal map object, for use by Thrift's batch_mutate API.
-
-
-
Method Detail
-
addMutationForCell
public void addMutationForCell(com.palantir.atlasdb.keyvalue.api.Cell cell, com.palantir.atlasdb.keyvalue.api.TableReference tableRef, org.apache.cassandra.thrift.Mutation mutation)
Adds the given mutation of the given cell for the given tableRef. This creates internal map values, if those are not already present. Not thread safe - if the map values are absent, then creating two values simultaneously in different threads may lead to a "last write wins" race condition.
-
toMap
public Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> toMap()
Gets the MutationMap's internal map object, for use by Thrift's batch_mutate API.- Returns:
- a reference to (not a copy of) the map wrapped by the MutationMap object
-
-