コード例 #1
0
  @Override
  public ColumnListMutation<C> incrementCounterColumn(C columnName, long amount) {
    // 1. Set up the column with all the data
    CounterColumn column = new CounterColumn();
    column.setName(columnSerializer.toByteBuffer(columnName));
    column.setValue(amount);

    // 2. Create a mutation and append to the mutation list.
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setCounter_column(column));
    mutationList.add(mutation);
    return this;
  }
コード例 #2
0
ファイル: KeyspaceTest.java プロジェクト: stephenc/hector
 private CounterColumn createCounterColumn(String name, long value) {
   CounterColumn cc = new CounterColumn();
   cc.setName(StringSerializer.get().toByteBuffer(name));
   cc.setValue(value);
   return cc;
 }