Exemplo n.º 1
0
        public RedisManagerPool(IEnumerable <string> hosts, RedisPoolConfig config)
        {
            if (hosts == null)
            {
                throw new ArgumentNullException("hosts");
            }

            RedisResolver = new RedisResolver(hosts, null);

            if (config == null)
            {
                config = new RedisPoolConfig();
            }

            this.OnFailover = new List <Action <IRedisClientsManager> >();

            this.MaxPoolSize = config.MaxPoolSize;

            clients   = new RedisClient[MaxPoolSize];
            poolIndex = 0;

            JsConfig.InitStatics();
        }
Exemplo n.º 2
0
 public RedisManagerPool(string host, RedisPoolConfig config) : this(new[] { host }, config)
 {
 }