Package com.hazelcast.client.connection.nio

Examples of com.hazelcast.client.connection.nio.ClientConnection$CleanResourcesTask


    public Xid[] recover() {
        final SerializationService serializationService = client.getSerializationService();
        final ClientInvocationServiceImpl invocationService = (ClientInvocationServiceImpl) client.getInvocationService();
        final Xid[] empty = new Xid[0];
        try {
            final ClientConnection connection = connect();
            if (connection == null) {
                return empty;
            }
            final RecoverAllTransactionsRequest request = new RecoverAllTransactionsRequest();
            final ICompletableFuture<SerializableCollection> future = invocationService.send(request, connection);
View Full Code Here


    }

    public boolean recover(Xid xid, boolean commit) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        final ClientConnection connection = recoveredTransactions.remove(sXid);
        if (connection == null) {
            return false;
        }
        final ClientInvocationServiceImpl invocationService = (ClientInvocationServiceImpl) client.getInvocationService();
        final RecoverTransactionRequest request = new RecoverTransactionRequest(sXid, commit);
View Full Code Here

        request.setSingleConnection();
        return doSend(request, connection, null);
    }

    public Future reSend(ClientCallFuture future) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        _send(future, connection);
        return future;
    }
View Full Code Here


    //NIO private

    private ICompletableFuture send(ClientRequest request) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, null);
    }
View Full Code Here

        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, null);
    }

    private ICompletableFuture send(ClientRequest request, Address target) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, null);
    }
View Full Code Here

        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, null);
    }

    private ICompletableFuture sendAndHandle(ClientRequest request, EventHandler handler) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, handler);
    }
View Full Code Here

        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, handler);
    }

    private ICompletableFuture sendAndHandle(ClientRequest request, Address target, EventHandler handler) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, handler);
    }
View Full Code Here

        return Clock.currentTimeMillis();
    }

    public Client getLocalClient() {
        ClientPrincipal cp = connectionManager.getPrincipal();
        ClientConnection conn = clusterThread.conn;
        return new ClientImpl(cp != null ? cp.getUuid() : null, conn != null ? conn.getLocalSocketAddress() : null);
    }
View Full Code Here

            membersRef.set(Collections.unmodifiableMap(map));
        }

        void shutdown() {
            interrupt();
            final ClientConnection c = conn;
            if (c != null) {
                c.close();
            }
        }
View Full Code Here

                final long nextTry = Clock.currentTimeMillis() + connectionAttemptPeriod;
                final Collection<InetSocketAddress> socketAddresses = getSocketAddresses();
                for (InetSocketAddress isa : socketAddresses) {
                    Address address = new Address(isa);
                    try {
                        final ClientConnection connection = connectionManager.ownerConnection(address);
                        fireConnectionEvent(false);
                        return connection;
                    } catch (IOException e) {
                        lastError = e;
                        logger.finest("IO error during initial connection...", e);
View Full Code Here

TOP

Related Classes of com.hazelcast.client.connection.nio.ClientConnection$CleanResourcesTask

Copyright © 2018 www.massapicom. 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.