コード例 #1
0
ファイル: RockMemoryCache.cs プロジェクト: NewSpring/Rock
 private void _redisConnection_ConnectionRestored( object sender, ConnectionFailedEventArgs e )
 {
     // flush the cache when the connection is restored
     if ( e.ConnectionType == ConnectionType.Subscription && _isRedisConnected == false )
     {
         FlushMemoryCache();
         _isRedisConnected = true;
     }
 }
コード例 #2
0
 private void OnConnectionRestored(object sender, ConnectionFailedEventArgs args)
 {
     var handler = ConnectionRestored;
     handler(args.Exception);
 }
コード例 #3
0
ファイル: RedisConnection.cs プロジェクト: MATTCASH83/SignalR
				private void SentinelConnectionRestored(object sender, ConnectionFailedEventArgs e)
				{
					// Workaround for StackExchange.Redis/issues/61 that sometimes Redis connection is not connected in ConnectionRestored event 
					while (!_sentinelConnection.IsConnected)
					{
						Task.Delay(200).Wait();
					}
					var subscriber = _sentinelConnection.GetSubscriber();
					subscriber.Subscribe("+switch-master", MasterWasSwitched);
				}
コード例 #4
0
ファイル: RockMemoryCache.cs プロジェクト: NewSpring/Rock
 private void _redisConnection_ConnectionFailed( object sender, ConnectionFailedEventArgs e )
 {
     if ( e.ConnectionType == ConnectionType.Subscription )
     {
         _isRedisConnected = false;
     }
 }
コード例 #5
0
 private void RedisConnection_ConnectionFailed(object sender, StackExchange.Redis.ConnectionFailedEventArgs e)
 {
     EnviarMensajes(REDIS_CLIENT, $"{nameof(RedisConnection_ConnectionFailed) + " - Error en una conexión fisica a redis. No hay conexión, mucha lentitud o el servidor tiene algun inconveniente"}");
 }
コード例 #6
0
ファイル: RedisConnection.cs プロジェクト: MATTCASH83/SignalR
        private void SentinelConnectionFailed(object sender, ConnectionFailedEventArgs e)
        {
          _sentinelConnection.ConnectionFailed -= SentinelConnectionFailed;
					_sentinelConnection.ConnectionRestored -= SentinelConnectionRestored;
					_sentinelConnection.Close();
          ConnectToSentinel();
        }
コード例 #7
0
 private void RedisConnection_ConnectionRestored(object sender, StackExchange.Redis.ConnectionFailedEventArgs e)
 {
     EnviarMensajes(REDIS_CLIENT, $"{nameof(RedisConnection_ConnectionRestored) + " - La conexión se restablecio"}");
 }
コード例 #8
0
        private void MuxerInstanceOnConnectionRestored(object sender, ConnectionFailedEventArgs connectionFailedEventArgs)
        {
            var epStr = connectionFailedEventArgs.EndPoint.ToString();
            RedisInstanceBase ins = null;
            if (!redisInstancesDict.TryGetValue(epStr, out ins))
            {
                return;
            }

            var master = ins as MasterInstance;
            if (master == null)
            {
                return;
            }

            if (ins.Group.Master != ins && Program.zkAdaptor.IsLeader(epStr))
            {
                Console.WriteLine("down {0} to slave of {1}", ins.EndPoint, ins.Group.Master.EndPoint);
                ins.Server.SlaveOf(ins.Group.Master.EndPoint);
                MasterToSlave(master);
            }
        }
コード例 #9
0
 private void OnConnectionRestored(object obj, ConnectionFailedEventArgs args)
 {
     // TODO LOGGING
     UpdateConnection();
 }
コード例 #10
0
 /// <summary>
 /// 重新建立连接之前的错误
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private static void MuxerConnectionRestored(object sender, ConnectionFailedEventArgs e)
 {
     Console.WriteLine("ConnectionRestored: " + e.EndPoint);
 }
コード例 #11
0
 /// <summary>
 /// 连接失败 , 如果重新连接成功你将不会收到这个通知
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private static void MuxerConnectionFailed(object sender, ConnectionFailedEventArgs e)
 {
     Console.WriteLine("重新连接:Endpoint failed: " + e.EndPoint + ", " + e.FailureType + (e.Exception == null ? "" : (", " + e.Exception.Message)));
 }