Freeze slave with <code>redis(s)://host:port</code> from slaves list.
Re-attach pub/sub listeners from it to other slave.
Shutdown old master client.

@param address of Redis
@return client
339117
public RFuture<RedisClient> changeMaster(URI address) {
        ClientConnectionsEntry oldMaster = masterEntry;
        RFuture<RedisClient> future = setupMasterEntry(address);
        changeMaster(address, oldMaster, future);
        return future;
    }
178269
public IRedisClient getRedisClient(final String host, final int port, final String username,
            final String password, final PoolConfig poolConfig) {
        String poolName = calcRedisPoolName(host, port, username, password, poolConfig);

        try {
            JedisClientPool redisClientPool = cacheRedisClientPools.get(poolName,
                    new Callable<JedisClientPool>() {
                        @Override
                        public JedisClientPool call() throws Exception {
                            return createRedisClientPool(host, port, username, password, poolConfig);
                        }
                    });
            return redisClientPool.borrowObject();
        } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);
            return null;
        }
    }
1205816
public Yoke listen(int port, @NotNull String address, final Handler<Boolean> handler) {
        HttpServer server = vertx.createHttpServer();

        listen(server);

        if (handler != null) {
            server.listen(port, address, new Handler<AsyncResult<HttpServer>>() {
                @Override
                public void handle(AsyncResult<HttpServer> listen) {
                    handler.handle(listen.succeeded());
                }
            });
        } else {
            server.listen(port, address);
        }
        return this;
    }
592168
public static io.scalecube.transport.Address toAddress(
      io.scalecube.services.transport.api.Address address) {
    return io.scalecube.transport.Address.create(address.host(), address.port());
  }
546286
public static UNIXServerSocket bindOn(final UNIXSocketAddress addr) throws IOException {
	UNIXServerSocket socket = newInstance();
	socket.bind(addr);
	return socket;
    }
814129
public long getId(final Address address) throws IOException {
    return retryRPC(() -> mClient
        .getMasterId(GetMasterIdPRequest.newBuilder().setMasterAddress(address.toProto()).build())
        .getMasterId());
  }
557538
public static RedisClusterManager newInstance(String host, int port, String password) {
        return newInstance(buildRedisConfig(host, port, password));
    }
41235
public Vertigo getCluster(String address, Handler<AsyncResult<Cluster>> resultHandler) {
    Cluster cluster = new DefaultCluster(address, vertx, container);
    cluster.ping(resultHandler);
    return this;
  }
1086199
public static Address from(String address) {
    int lastColon = address.lastIndexOf(':');
    int openBracket = address.indexOf('[');
    int closeBracket = address.indexOf(']');

    String host;
    if (openBracket != -1 && closeBracket != -1) {
      host = address.substring(openBracket + 1, closeBracket);
    } else if (lastColon != -1) {
      host = address.substring(0, lastColon);
    } else {
      host = address;
    }

    int port;
    if (lastColon != -1) {
      try {
        port = Integer.parseInt(address.substring(lastColon + 1));
      } catch (NumberFormatException e) {
        throw new MalformedAddressException(address, e);
      }
    } else {
      port = DEFAULT_PORT;
    }
    return new Address(host, port);
  }
520998
public void setInetAddress(final String address) {
        try {
            this.inetAddress = InetAddress.getByName(address);
        } catch (final UnknownHostException e) {
            throw new RuntimeException("Invalid address " + address);
        }
    }
930708
public NioServer init(InetSocketAddress address) {
		try {
			// 打开服务器套接字通道
			this.serverSocketChannel = ServerSocketChannel.open();
			// 设置为非阻塞状态
			serverSocketChannel.configureBlocking(false);
			// 获取通道相关联的套接字
			final ServerSocket serverSocket = serverSocketChannel.socket();
			// 绑定端口号
			serverSocket.bind(address);

			// 打开一个选择器
			selector = Selector.open();
			// 服务器套接字注册到Selector中 并指定Selector监控连接事件
			serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}

		return this;
	}
1170878
protected synchronized void bind(InetAddress address, int lport)
        throws IOException
    {
       synchronized (fdLock) {
            if (!closePending && (socket == null || !socket.isBound())) {
                NetHooks.beforeTcpBind(fd, address, lport);
            }
        }
        socketBind(address, lport);
        if (socket != null)
            socket.setBound();
        if (serverSocket != null)
            serverSocket.setBound();
    }
476425
public static HttpClient<ByteBuf, ByteBuf> newClient(String host, int port) {
        return newClient(new InetSocketAddress(host, port));
    }
840786
public Yoke listen(int port, @NotNull String address) {
        return listen(port, address, null);
    }
321019
public static boolean available(final String host, final int port)
	{
		Socket socket = null;
		try
		{
			socket = newSocket(host, port);
			return false;
		}
		catch (final IOException ignored)
		{
			return true;
		}
		finally
		{
			if (!closeClientSocket(socket))
			{
				LOGGER.error("Socket could not be closed on host " + host + " on port " + port);
			}
		}
	}
1368829
def _sconnect(host=None, port=None, password=None):
    '''
    
    '''
    if host is None:
        host = __salt__['config.option']('redis_sentinel.host', 'localhost')
    if port is None:
        port = __salt__['config.option']('redis_sentinel.port', 26379)
    if password is None:
        password = __salt__['config.option']('redis_sentinel.password')

    return redis.StrictRedis(host, port, password=password, decode_responses=True)
1364469
public CompletableFuture<Connection> getConnection(Address address) {
    Connection connection = connections.get(address);
    return connection == null ? createConnection(address) : CompletableFuture.completedFuture(connection);
  }