예제 #1
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.I64)
                    {
                        Timestamp = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        Super_column = iprot.ReadBinary();
                    }
                    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;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #2
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
      }
예제 #3
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);
 }
예제 #4
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;
 }
예제 #5
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();
 }
예제 #6
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
 }
예제 #7
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
      }
예제 #8
0
 public IAsyncResult send_get_count(AsyncCallback callback, object state, byte[] key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
예제 #9
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
 }
예제 #10
0
 public IAsyncResult send_get_indexed_slices(AsyncCallback callback, object state, ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
예제 #11
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
      }
예제 #12
0
 public IAsyncResult send_get_range_slices(AsyncCallback callback, object state, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level)
예제 #13
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
      }
예제 #14
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();
 }
예제 #15
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);
 }
예제 #16
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
      }
예제 #17
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;
 }
예제 #18
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
 }
예제 #19
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;
 }
예제 #20
0
 public IAsyncResult send_multiget_slice(AsyncCallback callback, object state, List<byte[]> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
예제 #21
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);
 }
예제 #22
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;
 }
예제 #23
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.I64) {
           Timestamp = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Super_column = iprot.ReadBinary();
         } 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;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }