org.apache.cassandra.db
Class RowMutation
java.lang.Object
org.apache.cassandra.db.RowMutation
- All Implemented Interfaces:
- IMutation
public class RowMutation
- extends java.lang.Object
- implements IMutation
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.util.UUID,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,
org.apache.cassandra.thrift.ColumnOrSuperColumn cosc)
|
void |
addCounter(QueryPath path,
long value)
|
ColumnFamily |
addOrGet(java.lang.String cfName)
|
void |
apply()
|
void |
applyUnsafe()
|
MessageOut<RowMutation> |
createMessage()
|
MessageOut<RowMutation> |
createMessage(MessagingService.Verb verb)
|
void |
delete(QueryPath path,
long timestamp)
|
void |
deleteColumnOrSuperColumn(java.lang.String cfName,
org.apache.cassandra.thrift.Deletion del)
|
java.util.Collection<ColumnFamily> |
getColumnFamilies()
|
ColumnFamily |
getColumnFamily(java.util.UUID cfId)
|
java.util.Collection<java.util.UUID> |
getColumnFamilyIds()
|
java.lang.String |
getTable()
|
static RowMutation |
hintFor(RowMutation mutation,
java.util.UUID targetId)
Returns mutation representing a Hints to be sent to address
as soon as it becomes available. |
boolean |
isEmpty()
|
java.nio.ByteBuffer |
key()
|
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 |
serializer
public static final RowMutation.RowMutationSerializer serializer
FORWARD_TO
public static final java.lang.String FORWARD_TO
- See Also:
- Constant Field Values
FORWARD_FROM
public static final java.lang.String FORWARD_FROM
- See Also:
- Constant Field Values
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.util.UUID,ColumnFamily> modifications)
getTable
public java.lang.String getTable()
- Specified by:
getTable
in interface IMutation
getColumnFamilyIds
public java.util.Collection<java.util.UUID> 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.util.UUID cfId)
hintFor
public static RowMutation hintFor(RowMutation mutation,
java.util.UUID targetId)
throws java.io.IOException
- Returns mutation representing a Hints to be sent to
address
as soon as it becomes available. See HintedHandoffManager for more details.
- 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()
- Specified by:
apply
in interface IMutation
applyUnsafe
public void applyUnsafe()
createMessage
public MessageOut<RowMutation> createMessage()
createMessage
public MessageOut<RowMutation> createMessage(MessagingService.Verb verb)
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,
org.apache.cassandra.thrift.ColumnOrSuperColumn cosc)
deleteColumnOrSuperColumn
public void deleteColumnOrSuperColumn(java.lang.String cfName,
org.apache.cassandra.thrift.Deletion del)
Copyright © 2013 The Apache Software Foundation