using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JiShe.CollectBus.Cassandra { public class CassandraConfig { public Node[] Nodes { get; set; } public string Username { get; set; } public string Password { get; set; } public string Keyspace { get; set; } public string ConsistencyLevel { get; set; } public Pooling PoolingOptions { get; set; } public Socket SocketOptions { get; set; } public Query QueryOptions { get; set; } public ReplicationStrategy ReplicationStrategy { get; set; } } public class Pooling { public int CoreConnectionsPerHost { get; set; } public int MaxConnectionsPerHost { get; set; } public int MaxRequestsPerConnection { get; set; } } public class Socket { public int ConnectTimeoutMillis { get; set; } public int ReadTimeoutMillis { get; set; } } public class Query { public string ConsistencyLevel { get; set; } public string SerialConsistencyLevel { get; set; } public bool DefaultIdempotence { get; set; } } public class ReplicationStrategy { public string Class { get; set; } public DataCenter[] DataCenters { get; set; } } public class DataCenter { public string Name { get; set; } public int ReplicationFactor { get; set; } public string Strategy { get; set; } } public class Node { public string Host { get; set; } public int Port { get; set; } public string DataCenter { get; set; } public string Rack { get; set; } } }