Package org.apache.cassandra.thrift

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


   * Add an Column insertion (or update) to the batch mutation request.
   */
  public ThrottlingBatchMutation<K> addInsertion(K key,
      List<String> columnFamilies, Column column)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setColumn(column));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here


   * Add a SuperColumn insertion (or update) to the batch mutation request.
   */
  public ThrottlingBatchMutation<K> addSuperInsertion(K key,
      List<String> columnFamilies, SuperColumn superColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setSuper_column(superColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

   * Add a ColumnCounter insertion (or update)
   */
  public ThrottlingBatchMutation<K> addCounterInsertion(K key,
      List<String> columnFamilies, CounterColumn counterColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setCounter_column(counterColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

   * Add a SuperColumnCounter insertion (or update)
   */
  public ThrottlingBatchMutation<K> addSuperCounterInsertion(K key,
      List<String> columnFamilies, CounterSuperColumn counterSuperColumn)
  {
    Mutation mutation = new Mutation();
    mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn()
        .setCounter_super_column(counterSuperColumn));
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

   * Add a deletion request to the batch mutation.
   */
  public ThrottlingBatchMutation<K> addDeletion(K key,
      List<String> columnFamilies, Deletion deletion)
  {
    Mutation mutation = new Mutation();
    mutation.setDeletion(deletion);
    addMutation(key, columnFamilies, mutation);
    return this;
  }
View Full Code Here

            writeMutations(key, mutationList);
    }

    private Mutation mutationFromTuple(Tuple t) throws IOException
    {
        Mutation mutation = new Mutation();
        if (t.get(1) == null)
        {
            // TODO: optional deletion
            mutation.deletion = new Deletion();
            mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();
View Full Code Here

    private void writeColumnsFromBag(ByteBuffer key, DefaultDataBag bag) throws IOException
    {
        List<Mutation> mutationList = new ArrayList<Mutation>();
        for (Tuple pair : bag)
        {
            Mutation mutation = new Mutation();
            if (DataType.findType(pair.get(1)) == DataType.BAG) // supercolumn
            {
                SuperColumn sc = new SuperColumn();
                sc.setName(objToBB(pair.get(0)));
                List<org.apache.cassandra.thrift.Column> columns = new ArrayList<org.apache.cassandra.thrift.Column>();
View Full Code Here

            writeMutations(key, mutationList);
    }

    private Mutation mutationFromTuple(Tuple t) throws IOException
    {
        Mutation mutation = new Mutation();
        if (t.get(1) == null)
        {
            if (allow_deletes)
            {
                mutation.deletion = new Deletion();
View Full Code Here

    private void writeColumnsFromBag(ByteBuffer key, DefaultDataBag bag) throws IOException
    {
        List<Mutation> mutationList = new ArrayList<Mutation>();
        for (Tuple pair : bag)
        {
            Mutation mutation = new Mutation();
            if (DataType.findType(pair.get(1)) == DataType.BAG) // supercolumn
            {
                SuperColumn sc = new SuperColumn();
                sc.setName(objToBB(pair.get(0)));
                List<org.apache.cassandra.thrift.Column> columns = new ArrayList<org.apache.cassandra.thrift.Column>();
View Full Code Here

        CfDef cfDef = getCfDef(storeSignature);
        try
        {
            for (Tuple pair : pairs)
            {
               Mutation mutation = new Mutation();
               if (DataType.findType(pair.get(1)) == DataType.BAG) // supercolumn
               {
                   org.apache.cassandra.thrift.SuperColumn sc = new org.apache.cassandra.thrift.SuperColumn();
                   sc.name = objToBB(pair.get(0));
                   ArrayList<org.apache.cassandra.thrift.Column> columns = new ArrayList<org.apache.cassandra.thrift.Column>();
View Full Code Here

TOP

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

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.