Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.Mutation$MutationTupleScheme


        // 2. Create the super column mutation if this is the first call
        if (superColumn == null) {
            superColumn = new CounterSuperColumn().setName(path.get(0));

            Mutation mutation = new Mutation();
            mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setCounter_super_column(superColumn));
            mutationList.add(mutation);
        }
        superColumn.addToColumns(column);

        return this;
View Full Code Here


        if (deletionPredicate == null) {
            deletionPredicate = new SlicePredicate();
            Deletion d = new Deletion().setTimestamp(timestamp).setSuper_column(path.get(0))
                    .setPredicate(deletionPredicate);

            mutationList.add(new Mutation().setDeletion(d));
        }

        deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName));
        return this;
    }
View Full Code Here

                                            }
                                            else {
                                                continue;
                                            }

                                            mutationList.add(new Mutation().setColumn_or_supercolumn(cosc));
                                        }

                                        // Create mutation map
                                        Map<ByteBuffer, Map<String, List<Mutation>>> mutationMap = new HashMap<ByteBuffer, Map<String, List<Mutation>>>();
                                        HashMap<String, List<Mutation>> cfmap = new HashMap<String, List<Mutation>>();
View Full Code Here

    private void addMutation(Column column) {
        // 2. Create the super column mutation if this is the first call
        if (superColumn == null) {
            superColumn = new SuperColumn().setName(path.get(0));

            Mutation mutation = new Mutation();
            mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setSuper_column(superColumn));
            mutationList.add(mutation);
        }

        superColumn.addToColumns(column);
    }
View Full Code Here

    @Override
    public ColumnListMutation<C> delete() {
        Deletion d = new Deletion();
        d.setSuper_column(path.get(0));
        d.setTimestamp(timestamp);
        mutationList.add(new Mutation().setDeletion(d));

        timestamp++;
        return this;
    }
View Full Code Here

            Deletion d = new Deletion();
            d.setTimestamp(timestamp);
            d.setSuper_column(path.get(0));
            d.setPredicate(deletionPredicate);

            mutationList.add(new Mutation().setDeletion(d));
        }

        deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName));
        return this;
    }
View Full Code Here

    private void writeColumnInternal(String colFamily, Bytes rowKey, Column column) {
      safeGetRowKey(rowKey);
      validateColumn(column);
        ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
        cosc.setColumn(column);
        Mutation mutation = new Mutation();
        mutation.setColumn_or_supercolumn(cosc);
        getMutationList(colFamily, rowKey).add(mutation);
    }
View Full Code Here

      validateColumnName(colName);
      validateColumns(subColumns);
        SuperColumn scol = new SuperColumn(nullSafeGet(colName), subColumns);
        ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
        cosc.setSuper_column(scol);
        Mutation mutation = new Mutation();
        mutation.setColumn_or_supercolumn(cosc);
        getMutationList(colFamily, rowKey).add(mutation);
    }
View Full Code Here

    public Mutator writeCounterColumn(String colFamily, Bytes rowKey, CounterColumn column) {
      safeGetRowKey(rowKey);
      validateColumn(column);
        ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
        cosc.setCounter_column(column);
        Mutation mutation = new Mutation();
        mutation.setColumn_or_supercolumn(cosc);
        getMutationList(colFamily, rowKey).add(mutation);

        return this;
    }
View Full Code Here

      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;
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.Mutation$MutationTupleScheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.