|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netflix.astyanax.thrift.AbstractThriftMutationBatchImpl
public abstract class AbstractThriftMutationBatchImpl
Basic implementation of a mutation batch using the thrift data structures. The thrift mutation data structure is, Map of Keys -> Map of ColumnFamily -> MutationList
Field Summary | |
---|---|
protected long |
timestamp
|
Constructor Summary | |
---|---|
AbstractThriftMutationBatchImpl(Clock clock)
|
Method Summary | ||
---|---|---|
|
deleteRow(Collection<ColumnFamily<K,?>> columnFamilies,
K rowKey)
Delete the row for all the specified column families |
|
void |
deserialize(ByteBuffer data)
Re-recreate a mutation batch from a serialized ByteBuffer created by a call to serialize(). |
|
void |
discardMutations()
Discard any pending mutations. |
|
Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> |
getMutationMap()
|
|
int |
getRowCount()
Returns the number of rows being mutated |
|
Map<ByteBuffer,Set<String>> |
getRowKeys()
Return a mapping of column families to rows being modified |
|
boolean |
isEmpty()
Checks whether the mutation object contains rows. |
|
MutationBatch |
lockCurrentTimestamp()
Force all future mutations to have the same timestamp. |
|
void |
mergeShallow(MutationBatch other)
Perform a shallow merge of mutations from another batch. |
|
ByteBuffer |
serialize()
Serialize the entire mutation batch into a ByteBuffer. |
|
MutationBatch |
setTimeout(long timeout)
This never really did anything :) |
|
MutationBatch |
setTimestamp(long timestamp)
Set the timestamp for all subsequent operations on this mutation |
|
String |
toString()
Generate a string representation of the mutation with the following syntax Key1: cf1: Mutation count cf2: Mutation count Key2: cf1: Mutation count cf2: Mutation count |
|
|
withRow(ColumnFamily<K,C> columnFamily,
K rowKey)
Mutate a row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.netflix.astyanax.MutationBatch |
---|
pinToHost, setConsistencyLevel, usingWriteAheadLog, withRetryPolicy |
Methods inherited from interface com.netflix.astyanax.Execution |
---|
execute, executeAsync |
Field Detail |
---|
protected long timestamp
Constructor Detail |
---|
public AbstractThriftMutationBatchImpl(Clock clock)
Method Detail |
---|
public <K,C> ColumnListMutation<C> withRow(ColumnFamily<K,C> columnFamily, K rowKey)
MutationBatch
withRow
in interface MutationBatch
public void discardMutations()
MutationBatch
discardMutations
in interface MutationBatch
public <K> void deleteRow(Collection<ColumnFamily<K,?>> columnFamilies, K rowKey)
MutationBatch
deleteRow
in interface MutationBatch
public boolean isEmpty()
isEmpty
in interface MutationBatch
public String toString()
toString
in class Object
public ByteBuffer serialize() throws Exception
MutationBatch
serialize
in interface MutationBatch
Exception
public void deserialize(ByteBuffer data) throws Exception
MutationBatch
deserialize
in interface MutationBatch
Exception
public Map<ByteBuffer,Set<String>> getRowKeys()
MutationBatch
getRowKeys
in interface MutationBatch
public Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> getMutationMap()
public void mergeShallow(MutationBatch other)
MutationBatch
mergeShallow
in interface MutationBatch
public int getRowCount()
MutationBatch
getRowCount
in interface MutationBatch
public MutationBatch setTimeout(long timeout)
MutationBatch
setTimeout
in interface MutationBatch
public MutationBatch setTimestamp(long timestamp)
MutationBatch
setTimestamp
in interface MutationBatch
public MutationBatch lockCurrentTimestamp()
MutationBatch
lockCurrentTimestamp
in interface MutationBatch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |