Examples of connectAsync()


Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_WRITE_TIMEOUT,
                                                TEST_MAX_FRAME_SIZE);
            // Wait while NiftyClient attempts to connect the channel
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_WRITE_TIMEOUT);
            // Wait while NiftyClient attempts to connect the channel
            future.get();
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_RECEIVE_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_SEND_TIMEOUT,
                                                TEST_MAX_FRAME_SIZE);
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_WRITE_TIMEOUT);
            // Wait while NiftyClient attempts to connect the channel
            future.get();
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_WRITE_TIMEOUT,
                                                TEST_MAX_FRAME_SIZE);
            // Wait while NiftyClient attempts to connect the channel
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_RECEIVE_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_SEND_TIMEOUT,
                                                TEST_MAX_FRAME_SIZE);
View Full Code Here

Examples of com.facebook.nifty.client.NiftyClient.connectAsync()

        int port = serverSocket.getLocalPort();

        final NiftyClient client = new NiftyClient();
        try {
            ListenableFuture<FramedClientChannel> future =
                            client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
                                                TEST_CONNECT_TIMEOUT,
                                                TEST_READ_TIMEOUT,
                                                TEST_WRITE_TIMEOUT,
                                                TEST_MAX_FRAME_SIZE);
            // Wait while NiftyClient attempts to connect the channel
View Full Code Here

Examples of com.lambdaworks.redis.RedisClient.connectAsync()

        Map<String, ClusterPartition> partitions = new HashMap<String, ClusterPartition>();

        for (URI addr : cfg.getNodeAddresses()) {
            RedisClient client = new RedisClient(group, addr.getHost(), addr.getPort(), cfg.getTimeout());
            RedisAsyncConnection<String, String> connection = client.connectAsync();
            String nodesValue = connection.clusterNodes().awaitUninterruptibly().getNow();
            System.out.println(nodesValue);

            List<ClusterNodeInfo> nodes = parse(nodesValue);
            for (ClusterNodeInfo clusterNodeInfo : nodes) {
View Full Code Here

Examples of com.lambdaworks.redis.RedisClient.connectAsync()

        c.setSubscriptionsPerConnection(cfg.getSubscriptionsPerConnection());

        final Set<String> addedSlaves = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
        for (URI addr : cfg.getSentinelAddresses()) {
            RedisClient client = new RedisClient(group, addr.getHost(), addr.getPort(), cfg.getTimeout());
            RedisAsyncConnection<String, String> connection = client.connectAsync();

            // TODO async
            List<String> master = connection.getMasterAddrByKey(cfg.getMasterName()).awaitUninterruptibly().getNow();
            String masterHost = master.get(0) + ":" + master.get(1);
            c.setMasterAddress(masterHost);
View Full Code Here

Examples of com.lambdaworks.redis.RedisClient.connectAsync()

    @SuppressWarnings({ "unchecked" })
    @Before
    public void setUp() {

      RedisClient clientMock = mock(RedisClient.class);
      when(clientMock.connectAsync((RedisCodec) any())).thenReturn(getNativeRedisConnectionMock());
      connection = new LettuceConnection(0, clientMock);
    }

    /**
     * @see DATAREDIS-184
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.