public CassandraKeyspaceSchema(KsDef def)
		{
#if DEBUG
			_def = def;
#endif

			Name = def.Name;
			Strategy = def.Strategy_class;
			StrategyOptions = def.Strategy_options ?? new Dictionary<string, string>();
			ColumnFamilies = def.Cf_defs.Select(family => new CassandraColumnFamilySchema(family)).ToList();
			DurableWrites = def.Durable_writes;
		}
예제 #2
0
 public void send_system_update_keyspace(KsDef ks_def)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("system_update_keyspace", TMessageType.Call, seqid_));
   system_update_keyspace_args args = new system_update_keyspace_args();
   args.Ks_def = ks_def;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #3
0
 public IAsyncResult send_system_update_keyspace(AsyncCallback callback, object state, KsDef ks_def)
예제 #4
0
      /// <summary>
      /// updates properties of a keyspace. returns the new schema id.
      /// </summary>
      /// <param name="ks_def"></param>
      public string system_update_keyspace(KsDef ks_def)
      {
        #if !SILVERLIGHT
        send_system_update_keyspace(ks_def);
        return recv_system_update_keyspace();

        #else
        var asyncResult = Begin_system_update_keyspace(null, null, ks_def);
        return End_system_update_keyspace(asyncResult);

        #endif
      }
예제 #5
0
 public IAsyncResult Begin_system_update_keyspace(AsyncCallback callback, object state, KsDef ks_def)
 {
   return send_system_update_keyspace(callback, state, ks_def);
 }
예제 #6
0
 public void Read (TProtocol iprot)
 {
   bool isset_ks_def = 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) {
           Ks_def = new KsDef();
           Ks_def.Read(iprot);
           isset_ks_def = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_ks_def)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
예제 #7
0
 public system_update_keyspace_args(KsDef ks_def) : this() {
   this.Ks_def = ks_def;
 }
예제 #8
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 0:
         if (field.Type == TType.Struct) {
           Success = new KsDef();
           Success.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Nfe = new NotFoundException();
           Nfe.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Ire = new InvalidRequestException();
           Ire.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
예제 #9
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 0:
         if (field.Type == TType.List) {
           {
             Success = new List<KsDef>();
             TList _list191 = iprot.ReadListBegin();
             for( int _i192 = 0; _i192 < _list191.Count; ++_i192)
             {
               KsDef _elem193 = new KsDef();
               _elem193 = new KsDef();
               _elem193.Read(iprot);
               Success.Add(_elem193);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Ire = new InvalidRequestException();
           Ire.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
예제 #10
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) {
           Ks_def = new KsDef();
           Ks_def.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }