|
||||||||||
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 Clock |
clock
|
protected Clock |
sysClock
|
Constructor Summary | |
---|---|
AbstractThriftMutationBatchImpl(Clock clock)
|
Method Summary | ||
---|---|---|
|
deleteRow(Collection<ColumnFamily<K,?>> columnFamilies,
K rowKey)
Delete the row for all the specified column families |
|
void |
discardMutations()
Discard any pending mutations. |
|
OperationResult<Void> |
execute()
Block while executing the operations |
|
static AbstractThriftMutationBatchImpl |
fromByteBuffer(ByteBuffer blob)
|
|
protected Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> |
getMutationMap()
|
|
int |
getRowCount()
Returns the number of rows being mutated |
|
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. |
|
MutationBatch |
setTimeout(long timeout)
This never really did anything :) |
|
MutationBatch |
setTimestamp(long timestamp)
Set the timestamp for all subsequent operations on this mutation |
|
protected ByteBuffer |
toByteBuffer()
|
|
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, withRetryPolicy |
Methods inherited from interface com.netflix.astyanax.Execution |
---|
executeAsync |
Field Detail |
---|
protected Clock clock
protected Clock sysClock
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
protected ByteBuffer toByteBuffer() throws Exception
Exception
public static AbstractThriftMutationBatchImpl fromByteBuffer(ByteBuffer blob)
protected 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
public OperationResult<Void> execute() throws ConnectionException
Execution
execute
in interface Execution<Void>
ConnectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |