Example #1
0
 public remove_counter_args(byte[] key, ColumnPath path, ConsistencyLevel consistency_level) : this() {
   this.Key = key;
   this.Path = path;
   this.Consistency_level = consistency_level;
 }
Example #2
0
 public void Read (TProtocol iprot)
 {
   bool isset_key = false;
   bool isset_path = 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) {
           Path = new ColumnPath();
           Path.Read(iprot);
           isset_path = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         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_path)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_consistency_level)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #3
0
 public void send_get(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("get", TMessageType.Call, seqid_));
   get_args args = new get_args();
   args.Key = key;
   args.Column_path = column_path;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Example #4
0
 public remove_args(byte[] key, ColumnPath column_path, long timestamp) : this() {
   this.Key = key;
   this.Column_path = column_path;
   this.Timestamp = timestamp;
 }
Example #5
0
      /// <summary>
      /// Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is
      /// the only method that can throw an exception under non-failure conditions.)
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_path"></param>
      /// <param name="consistency_level"></param>
      public ColumnOrSuperColumn get(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get(key, column_path, consistency_level);
        return recv_get();

        #else
        var asyncResult = Begin_get(null, null, key, column_path, consistency_level);
        return End_get(asyncResult);

        #endif
      }
Example #6
0
 public IAsyncResult send_get(AsyncCallback callback, object state, byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level)
Example #7
0
 public get_args(byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level) : this() {
   this.Key = key;
   this.Column_path = column_path;
   this.Consistency_level = consistency_level;
 }
Example #8
0
 public IAsyncResult Begin_get(AsyncCallback callback, object state, byte[] key, ColumnPath column_path, ConsistencyLevel consistency_level)
 {
   return send_get(callback, state, key, column_path, consistency_level);
 }
Example #9
0
      /// <summary>
      /// Remove a counter at the specified location.
      /// Note that counters have limited support for deletes: if you remove a counter, you must wait to issue any following update
      /// until the delete has reached all the nodes and all of them have been fully compacted.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="path"></param>
      /// <param name="consistency_level"></param>
      public void remove_counter(byte[] key, ColumnPath path, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_remove_counter(key, path, consistency_level);
        recv_remove_counter();

        #else
        var asyncResult = Begin_remove_counter(null, null, key, path, consistency_level);
        End_remove_counter(asyncResult);

        #endif
      }
Example #10
0
 public IAsyncResult send_remove_counter(AsyncCallback callback, object state, byte[] key, ColumnPath path, ConsistencyLevel consistency_level)
Example #11
0
 public IAsyncResult Begin_remove_counter(AsyncCallback callback, object state, byte[] key, ColumnPath path, ConsistencyLevel consistency_level)
 {
   return send_remove_counter(callback, state, key, path, consistency_level);
 }
Example #12
0
 public IAsyncResult send_remove(AsyncCallback callback, object state, byte[] key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level)
Example #13
0
      /// <summary>
      /// Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note
      /// that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire
      /// row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too.
      /// </summary>
      /// <param name="key"></param>
      /// <param name="column_path"></param>
      /// <param name="timestamp"></param>
      /// <param name="consistency_level"></param>
      public void remove(byte[] key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_remove(key, column_path, timestamp, consistency_level);
        recv_remove();

        #else
        var asyncResult = Begin_remove(null, null, key, column_path, timestamp, consistency_level);
        End_remove(asyncResult);

        #endif
      }
Example #14
0
 public IAsyncResult Begin_remove(AsyncCallback callback, object state, byte[] key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level)
 {
   return send_remove(callback, state, key, column_path, timestamp, consistency_level);
 }
Example #15
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) {
           Path = new ColumnPath();
           Path.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         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();
 }