Example #1
0
 public IAsyncResult send_multiget_slice(AsyncCallback callback, object state, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
Example #2
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Index_clause = new IndexClause();
           Index_clause.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column_predicate = new SlicePredicate();
           Column_predicate.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Example #3
0
      /// <summary>
      /// returns the number of columns matching <code>predicate</code> for a particular <code>key</code>,
      /// <code>ColumnFamily</code> and optionally <code>SuperColumn</code>.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_parent"></param>
      /// <param name="predicate"></param>
      /// <param name="consistency_level"></param>
      public int get_count(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get_count(key, column_parent, predicate, consistency_level);
        return recv_get_count();

        #else
        var asyncResult = Begin_get_count(null, null, key, column_parent, predicate, consistency_level);
        return End_get_count(asyncResult);

        #endif
      }
Example #4
0
 public void send_get_count(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("get_count", TMessageType.Call, seqid_));
   get_count_args args = new get_count_args();
   args.Key = key;
   args.Column_parent = column_parent;
   args.Predicate = predicate;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Example #5
0
      /// <summary>
      /// Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name
      /// pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_parent"></param>
      /// <param name="predicate"></param>
      /// <param name="consistency_level"></param>
      public List<ColumnOrSuperColumn> get_slice(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get_slice(key, column_parent, predicate, consistency_level);
        return recv_get_slice();

        #else
        var asyncResult = Begin_get_slice(null, null, key, column_parent, predicate, consistency_level);
        return End_get_slice(asyncResult);

        #endif
      }
Example #6
0
 public void Read (TProtocol iprot)
 {
   bool isset_key = false;
   bool isset_column_parent = false;
   bool isset_column = false;
   bool isset_consistency_level = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           Key = iprot.ReadBinary();
           isset_key = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
           isset_column_parent = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column = new CounterColumn();
           Column.Read(iprot);
           isset_column = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
           isset_consistency_level = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_key)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_column_parent)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_column)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_consistency_level)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #7
0
 public void send_get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("get_indexed_slices", TMessageType.Call, seqid_));
   get_indexed_slices_args args = new get_indexed_slices_args();
   args.Column_parent = column_parent;
   args.Index_clause = index_clause;
   args.Column_predicate = column_predicate;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Example #8
0
 public get_indexed_slices_args(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level) : this() {
   this.Column_parent = column_parent;
   this.Index_clause = index_clause;
   this.Column_predicate = column_predicate;
   this.Consistency_level = consistency_level;
 }
Example #9
0
      /// <summary>
      /// Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause
      /// @deprecated use get_range_slices instead with range.row_filter specified
      /// </summary>
      /// <param name="column_parent"></param>
      /// <param name="index_clause"></param>
      /// <param name="column_predicate"></param>
      /// <param name="consistency_level"></param>
      public List<KeySlice> get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level);
        return recv_get_indexed_slices();

        #else
        var asyncResult = Begin_get_indexed_slices(null, null, column_parent, index_clause, column_predicate, consistency_level);
        return End_get_indexed_slices(asyncResult);

        #endif
      }
Example #10
0
 public IAsyncResult send_get_indexed_slices(AsyncCallback callback, object state, ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
Example #11
0
 public IAsyncResult send_get_range_slices(AsyncCallback callback, object state, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level)
Example #12
0
      /// <summary>
      /// returns a subset of columns for a contiguous range of keys.
      /// </summary>
      /// <param name="column_parent"></param>
      /// <param name="predicate"></param>
      /// <param name="range"></param>
      /// <param name="consistency_level"></param>
      public List<KeySlice> get_range_slices(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get_range_slices(column_parent, predicate, range, consistency_level);
        return recv_get_range_slices();

        #else
        var asyncResult = Begin_get_range_slices(null, null, column_parent, predicate, range, consistency_level);
        return End_get_range_slices(asyncResult);

        #endif
      }
Example #13
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           Key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column = new CounterColumn();
           Column.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Example #14
0
 public void Read (TProtocol iprot)
 {
   bool isset_keys = false;
   bool isset_column_parent = false;
   bool isset_predicate = false;
   bool isset_consistency_level = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.List) {
           {
             Keys = new List<byte[]>();
             TList _list125 = iprot.ReadListBegin();
             for( int _i126 = 0; _i126 < _list125.Count; ++_i126)
             {
               byte[] _elem127 = null;
               _elem127 = iprot.ReadBinary();
               Keys.Add(_elem127);
             }
             iprot.ReadListEnd();
           }
           isset_keys = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
           isset_column_parent = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Predicate = new SlicePredicate();
           Predicate.Read(iprot);
           isset_predicate = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
           isset_consistency_level = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_keys)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_column_parent)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_predicate)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_consistency_level)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #15
0
      /// <summary>
      /// Insert a Column at the given column_parent.column_family and optional column_parent.super_column.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_parent"></param>
      /// <param name="column"></param>
      /// <param name="consistency_level"></param>
      public void insert(byte[] key, ColumnParent column_parent, Column column, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_insert(key, column_parent, column, consistency_level);
        recv_insert();

        #else
        var asyncResult = Begin_insert(null, null, key, column_parent, column, consistency_level);
        End_insert(asyncResult);

        #endif
      }
Example #16
0
 public get_range_slices_args(ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level) : this() {
   this.Column_parent = column_parent;
   this.Predicate = predicate;
   this.Range = range;
   this.Consistency_level = consistency_level;
 }
Example #17
0
 public IAsyncResult Begin_add(AsyncCallback callback, object state, byte[] key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level)
 {
   return send_add(callback, state, key, column_parent, column, consistency_level);
 }
Example #18
0
 public void Read (TProtocol iprot)
 {
   bool isset_column_parent = false;
   bool isset_index_clause = false;
   bool isset_column_predicate = false;
   bool isset_consistency_level = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
           isset_column_parent = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Index_clause = new IndexClause();
           Index_clause.Read(iprot);
           isset_index_clause = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column_predicate = new SlicePredicate();
           Column_predicate.Read(iprot);
           isset_column_predicate = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
           isset_consistency_level = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_column_parent)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_index_clause)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_column_predicate)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_consistency_level)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #19
0
      /// <summary>
      /// Increment or decrement a counter.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_parent"></param>
      /// <param name="column"></param>
      /// <param name="consistency_level"></param>
      public void add(byte[] key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_add(key, column_parent, column, consistency_level);
        recv_add();

        #else
        var asyncResult = Begin_add(null, null, key, column_parent, column, consistency_level);
        End_add(asyncResult);

        #endif
      }
Example #20
0
 public add_args(byte[] key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level) : this() {
   this.Key = key;
   this.Column_parent = column_parent;
   this.Column = column;
   this.Consistency_level = consistency_level;
 }
Example #21
0
 public IAsyncResult send_add(AsyncCallback callback, object state, byte[] key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level)
Example #22
0
 public IAsyncResult Begin_get_count(AsyncCallback callback, object state, byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
 {
   return send_get_count(callback, state, key, column_parent, predicate, consistency_level);
 }
Example #23
0
 public void send_add(byte[] key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("add", TMessageType.Call, seqid_));
   add_args args = new add_args();
   args.Key = key;
   args.Column_parent = column_parent;
   args.Column = column;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Example #24
0
 public IAsyncResult send_get_count(AsyncCallback callback, object state, byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
Example #25
0
 public get_count_args(byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) : this() {
   this.Key = key;
   this.Column_parent = column_parent;
   this.Predicate = predicate;
   this.Consistency_level = consistency_level;
 }
Example #26
0
      /// <summary>
      /// Performs a get_slice for column_parent and predicate for the given keys in parallel.
      /// </summary>
      /// <param name="keys"></param>
      /// <param name="column_parent"></param>
      /// <param name="predicate"></param>
      /// <param name="consistency_level"></param>
      public Dictionary<byte[], List<ColumnOrSuperColumn>> multiget_slice(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_multiget_slice(keys, column_parent, predicate, consistency_level);
        return recv_multiget_slice();

        #else
        var asyncResult = Begin_multiget_slice(null, null, keys, column_parent, predicate, consistency_level);
        return End_multiget_slice(asyncResult);

        #endif
      }
Example #27
0
 public multiget_count_args(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) : this() {
   this.Keys = keys;
   this.Column_parent = column_parent;
   this.Predicate = predicate;
   this.Consistency_level = consistency_level;
 }
Example #28
0
 public void send_multiget_slice(List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("multiget_slice", TMessageType.Call, seqid_));
   multiget_slice_args args = new multiget_slice_args();
   args.Keys = keys;
   args.Column_parent = column_parent;
   args.Predicate = predicate;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Example #29
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.List) {
           {
             Keys = new List<byte[]>();
             TList _list112 = iprot.ReadListBegin();
             for( int _i113 = 0; _i113 < _list112.Count; ++_i113)
             {
               byte[] _elem114 = null;
               _elem114 = iprot.ReadBinary();
               Keys.Add(_elem114);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Column_parent = new ColumnParent();
           Column_parent.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Predicate = new SlicePredicate();
           Predicate.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }