## org.apache.cassandra.db
Class RowMutation

    java.lang.Object
      org.apache.cassandra.db.RowMutation

All Implemented Interfaces:
  IMutation, MessageProducer

    public class RowMutation

extends java.lang.Object
implements IMutation, MessageProducer

Nested Class Summary
`static class` `RowMutation.RowMutationSerializer`

Field Summary
`static java.lang.String` `FORWARD_HEADER`
`protected java.util.Map<java.lang.Integer,ColumnFamily>` `modifications_`

Constructor Summary
`` `RowMutation(java.lang.String table, java.nio.ByteBuffer key)`
`protected` `RowMutation(java.lang.String table, java.nio.ByteBuffer key, java.util.Map<java.lang.Integer,ColumnFamily> modifications)`
`` `RowMutation(java.lang.String table, Row row)`

Method Summary
`void` `add(ColumnFamily columnFamily)`
`void` `add(QueryPath path, java.nio.ByteBuffer value, long timestamp)`
`void` `add(QueryPath path, java.nio.ByteBuffer value, long timestamp, int timeToLive)`
`void` `addAll(IMutation m)`
`void` `addColumnOrSuperColumn(java.lang.String cfName, ColumnOrSuperColumn cosc)`
`void` `addCounter(QueryPath path, long value)`
`ColumnFamily` `addOrGet(java.lang.String cfName)`
`void` `apply()`
`void` `applyUnsafe()`
`void` `delete(QueryPath path, long timestamp)`
`void` `deleteColumnOrSuperColumn(java.lang.String cfName, Deletion del)`
`static RowMutation` `fromBytes(byte[] raw, int version)`
`java.util.Collection<ColumnFamily>` `getColumnFamilies()`
`ColumnFamily` `getColumnFamily(java.lang.Integer cfId)`
`java.util.Collection<java.lang.Integer>` `getColumnFamilyIds()`
`Message` `getMessage(java.lang.Integer version)`
`Message` `getMessage(StorageService.Verb verb, int version)`
`byte[]` `getSerializedBuffer(int version)`
`java.lang.String` `getTable()`
`static RowMutation` `hintFor(RowMutation mutation, java.nio.ByteBuffer token)` Returns mutation representing a Hints to be sent to `address` as soon as it becomes available.
`boolean` `isEmpty()`
`java.nio.ByteBuffer` `key()`
`static RowMutation.RowMutationSerializer` `serializer()`
`java.lang.String` `toString()`
`java.lang.String` `toString(boolean shallow)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FORWARD_HEADER

    public static final java.lang.String FORWARD_HEADER

See Also:
  Constant Field Values

### modifications_

    protected java.util.Map<java.lang.Integer,ColumnFamily> modifications_

Constructor Detail

### RowMutation

    public RowMutation(java.lang.String table,
                       java.nio.ByteBuffer key)

### RowMutation

    public RowMutation(java.lang.String table,
                       Row row)

### RowMutation

    protected RowMutation(java.lang.String table,
                          java.nio.ByteBuffer key,
                          java.util.Map<java.lang.Integer,ColumnFamily> modifications)

Method Detail

### serializer

    public static RowMutation.RowMutationSerializer serializer()

### getTable

    public java.lang.String getTable()

  Specified by:
    `getTable` in interface `IMutation`

### getColumnFamilyIds

    public java.util.Collection<java.lang.Integer> getColumnFamilyIds()

  Specified by:
    `getColumnFamilyIds` in interface `IMutation`

### key

    public java.nio.ByteBuffer key()

  Specified by:
    `key` in interface `IMutation`

### getColumnFamilies

    public java.util.Collection<ColumnFamily> getColumnFamilies()

### getColumnFamily

    public ColumnFamily getColumnFamily(java.lang.Integer cfId)

### hintFor

    public static RowMutation hintFor(RowMutation mutation,
                                      java.nio.ByteBuffer token)
                               throws java.io.IOException

  Returns mutation representing a Hints to be sent to `address` as soon as it becomes available. The format is the following: HintsColumnFamily: { // cf <dest token>: { // key <uuid>: { // super-column table:

  // columns key: <key> mutation: <mutation> version: <version> } } }

  Throws:
    `java.io.IOException`

### add

    public void add(ColumnFamily columnFamily)

### addOrGet

    public ColumnFamily addOrGet(java.lang.String cfName)

  Returns:
    the ColumnFamily in this RowMutation corresponding to @param cfName, creating an empty one if necessary.

### isEmpty

    public boolean isEmpty()

### add

    public void add(QueryPath path,
                    java.nio.ByteBuffer value,
                    long timestamp,
                    int timeToLive)

### addCounter

    public void addCounter(QueryPath path,
                           long value)

### add

    public void add(QueryPath path,
                    java.nio.ByteBuffer value,
                    long timestamp)

### delete

    public void delete(QueryPath path,
                       long timestamp)

### addAll

    public void addAll(IMutation m)

  Specified by:
    `addAll` in interface `IMutation`

### apply

    public void apply()
               throws java.io.IOException

  Specified by:
    `apply` in interface `IMutation`
  Throws:
    `java.io.IOException`

### applyUnsafe

    public void applyUnsafe()
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### getMessage

    public Message getMessage(java.lang.Integer version)
                       throws java.io.IOException

  Specified by:
    `getMessage` in interface `MessageProducer`
  Throws:
    `java.io.IOException`

### getMessage

    public Message getMessage(StorageService.Verb verb,
                              int version)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getSerializedBuffer

    public byte[] getSerializedBuffer(int version)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### toString

    public java.lang.String toString(boolean shallow)

  Specified by:
    `toString` in interface `IMutation`

### addColumnOrSuperColumn

    public void addColumnOrSuperColumn(java.lang.String cfName,
                                       ColumnOrSuperColumn cosc)

### deleteColumnOrSuperColumn

    public void deleteColumnOrSuperColumn(java.lang.String cfName,
                                          Deletion del)

### fromBytes

    public static RowMutation fromBytes(byte[] raw,
                                        int version)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

Copyright © 2013 The Apache Software Foundation