Exemple #1
0
 public static IRedisSentinelClient NewSentinel(RedisSentinelSettings settings)
 {
     if (settings == null)
     {
         throw new RedisFatalException(new ArgumentNullException("settings"), RedisErrorCode.MissingParameter);
     }
     return(new RedisSentinelClient(settings));
 }
        public RedisSentinelClient(RedisSentinelSettings settings, bool throwOnError = true)
            : base(throwOnError)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            m_Settings           = settings;
            m_ConnectionProvider = new RedisSentinelConnectionProvider(m_Settings);
        }
Exemple #3
0
 internal RedisSentinelConnection(string name, RedisSentinelSettings settings,
                                  Action <RedisConnection, RedisSocket> onCreateSocket, Action <RedisConnection, RedisSocket> onReleaseSocket,
                                  RedisSocket socket = null, bool connectImmediately = false)
     : base(name, RedisRole.Sentinel, settings, onCreateSocket, onReleaseSocket, socket, connectImmediately)
 {
 }
 public RedisSentinelConnectionProvider(RedisSentinelSettings settings)
     : base(String.Format("{0}, {1}", typeof(RedisSentinelConnectionProvider).Name,
                          RedisIDGenerator <RedisSentinelConnectionProvider> .NextId()), settings)
 {
 }