//Should be in lock when doing this private void RequestServerStreamingMap(Server server) { string serverId = server.Id; var uri = new UriBuilder { Path = String.Format("pools/default/bucketsStreaming/{2}", server.HostName, server.StreamingPort, _bucketName) }; var streamingCommand = new LineReadingHttpCommand(uri, null, (json, _) => OnServerStreamMapUpdated(serverId, json), (response, value, state) => { }); server.StreamingHttpClient.TrySend(streamingCommand); }
public static Server EnsureServer(Cluster cluster, string hostname, int memcachedPort) { var id = Server.GetId(hostname, memcachedPort); var server = cluster.GetServerById(id); if (server == null) { server = new Server(hostname, memcachedPort); cluster.AddServer(server); } return server; }
public ReconnectAttempt(TcpClient tcpClient, Server server) { TcpClient = tcpClient; Server = server; }