use of org.apache.cassandra.thrift.CounterSuperColumn in project scale7-pelops by s7.
the class Mutator method writeSubCounterColumns.
/**
* Writes multiple sub-counter-column values to a super column.
*
* @param colFamily The column family
* @param rowKey The key of the row to modify
* @param colName The name of the super column
* @param subColumns A list of the sub-counter-columns to write
*/
public Mutator writeSubCounterColumns(String colFamily, Bytes rowKey, Bytes colName, List<CounterColumn> subColumns) {
safeGetRowKey(rowKey);
validateColumnName(colName);
validateCounterColumns(subColumns);
CounterSuperColumn scol = new CounterSuperColumn(nullSafeGet(colName), subColumns);
ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
cosc.setCounter_super_column(scol);
Mutation mutation = new Mutation();
mutation.setColumn_or_supercolumn(cosc);
getMutationList(colFamily, rowKey).add(mutation);
return this;
}
Aggregations