Class MutationMap


  • @NotThreadSafe
    public class MutationMap
    extends Object
    • Constructor Detail

      • MutationMap

        public MutationMap()
    • 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