Пример #1
0
 internal DataStoreShard(DataStore owner, System.Net.HostEndPoint endPoint)
 {
     _owner = owner;
     _endPoint = endPoint;
     _subscribeListenerClient = Allocate();
     _subscribeListenerThread = new Thread(ListenerLoop);
     _subscribeListenerThread.Start();
 }
Пример #2
0
 internal static RedisProtocolClient Create(System.Net.HostEndPoint endPoint, int millisecondsTimeout = 1000)
 {
     var result = new RedisProtocolClient(endPoint, millisecondsTimeout);
     if (!result._connected)
         throw new FailedToConnectException();
     return result;
 }
Пример #3
0
 void Release(RedisProtocolClient client)
 {
     lock (_availableClients)
     {
         _availableClients.Enqueue(client);
     }
 }