public BatchMutation deepCopy() { return new BatchMutation(this); }
/** * @return a List of BatchMutations with the following effects: * (rowA, columnA): delete * (rowA, columnB): place valueC * (rowB, columnA): place valueC * (rowB, columnB): place valueD */ private static List<BatchMutation> getBatchMutations() { List<BatchMutation> batchMutations = new ArrayList<>(3); // Mutations to rowA. You can't mix delete and put anymore. List<Mutation> rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(true, columnAname, null, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(false, columnBname, valueCname, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); // Mutations to rowB List<Mutation> rowBmutations = new ArrayList<>(2); rowBmutations.add(new Mutation(false, columnAname, valueCname, true)); rowBmutations.add(new Mutation(false, columnBname, valueDname, true)); batchMutations.add(new BatchMutation(rowBname, rowBmutations)); return batchMutations; }
public BatchMutation deepCopy() { return new BatchMutation(this); }
public BatchMutation deepCopy() { return new BatchMutation(this); }
public BatchMutation deepCopy() { return new BatchMutation(this); }
public BatchMutation deepCopy() { return new BatchMutation(this); }
public BatchMutation deepCopy() { return new BatchMutation(this); }
private List<BatchMutation> getMutations(List<Row> rows) { List<BatchMutation> result = new ArrayList<BatchMutation>(); for (Row row : rows) { result.add(new BatchMutation(ByteBuffer.wrap(row.getId()), getMutations(row))); } return result; }
/** * * @return a List of BatchMutations with the following effects: * (rowA, columnA): delete * (rowA, columnB): place valueC * (rowB, columnA): place valueC * (rowB, columnB): place valueD */ private static List<BatchMutation> getBatchMutations() { List<BatchMutation> batchMutations = new ArrayList<>(3); // Mutations to rowA. You can't mix delete and put anymore. List<Mutation> rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(true, columnAname, null, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(false, columnBname, valueCname, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); // Mutations to rowB List<Mutation> rowBmutations = new ArrayList<>(2); rowBmutations.add(new Mutation(false, columnAname, valueCname, true)); rowBmutations.add(new Mutation(false, columnBname, valueDname, true)); batchMutations.add(new BatchMutation(rowBname, rowBmutations)); return batchMutations; }
/** * * @return a List of BatchMutations with the following effects: * (rowA, columnA): delete * (rowA, columnB): place valueC * (rowB, columnA): place valueC * (rowB, columnB): place valueD */ private static List<BatchMutation> getBatchMutations() { List<BatchMutation> batchMutations = new ArrayList<>(3); // Mutations to rowA. You can't mix delete and put anymore. List<Mutation> rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(true, columnAname, null, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); rowAmutations = new ArrayList<>(1); rowAmutations.add(new Mutation(false, columnBname, valueCname, true)); batchMutations.add(new BatchMutation(rowAname, rowAmutations)); // Mutations to rowB List<Mutation> rowBmutations = new ArrayList<>(2); rowBmutations.add(new Mutation(false, columnAname, valueCname, true)); rowBmutations.add(new Mutation(false, columnBname, valueDname, true)); batchMutations.add(new BatchMutation(rowBname, rowBmutations)); return batchMutations; }