Examples of live()


Examples of com.hazelcast.nio.Connection.live()

                    logger.finest("Handling master response: " + this);
                }
                final Address currentMaster = node.getMasterAddress();
                if (currentMaster != null && !currentMaster.equals(masterAddress)) {
                    final Connection conn = node.connectionManager.getConnection(currentMaster);
                    if (conn != null && conn.live()) {
                        logger.warning("Ignoring master response from " + masterAddress +
                                ", since this node has an active master: " + currentMaster);
                        return;
                    }
                }
View Full Code Here

Examples of com.hazelcast.nio.Connection.live()

            } catch (LoginException e) {
                logger.finest(e.getMessage());
            }
            try {
                final Connection conn = endpoint.getConnection();
                if (conn.live()) {
                    conn.close();
                }
            } catch (Exception e) {
                logger.finest(e);
            }
View Full Code Here

Examples of com.hazelcast.nio.Connection.live()

                    conn = getConnection();
                    if (conn != null) {
                        conn = authorizeConnection(conn);
                    }
                }
                if (conn != null && conn.live()) {
                    Data data = node.nodeEngine.getSerializationService().toData(event);
                    Packet packet = new Packet(data, node.nodeEngine.getPortableContext());
                    packet.setHeader(Packet.HEADER_WAN_REPLICATION);
                    node.nodeEngine.send(packet, conn);
                } else {
View Full Code Here

Examples of com.hazelcast.nio.Connection.live()

                LOGGER.warning("While closing client connection: " + connection, e);
            }
        } else {
            nodeEngine.getExecutionService().schedule(new Runnable() {
                public void run() {
                    if (connection.live()) {
                        try {
                            connection.close();
                        } catch (Throwable e) {
                            LOGGER.warning("While closing client connection: " + e.toString());
                        }
View Full Code Here

Examples of com.hazelcast.nio.Connection.live()

        return false;
    }

    private boolean checkAlreadyConnected(TcpIpConnection connection, Address remoteEndPoint) {
        final Connection existingConnection = connectionsMap.get(remoteEndPoint);
        if (existingConnection != null && existingConnection.live()) {
            if (existingConnection != connection) {
                if (logger.isFinestEnabled()) {
                    log(Level.FINEST, existingConnection + " is already bound to " + remoteEndPoint
                            + ", new one is " + connection);
                }
View Full Code Here

Examples of org.apache.cassandra.db.filter.ColumnCounter.live()

        // Discard the first 'toDiscard' live
        while (iter.hasNext())
        {
            Column c = iter.next();
            counter.count(c, tester);
            if (counter.live() > toDiscard)
            {
                copy.addColumn(c);
                while (iter.hasNext())
                    copy.addColumn(iter.next());
            }
View Full Code Here

Examples of org.apache.cassandra.db.filter.ColumnCounter.live()

                copy.addColumn(c);
                while (iter.hasNext())
                    copy.addColumn(iter.next());
            }
        }
        return Math.min(counter.live(), toDiscard);
    }

    private int discardTail(ColumnFamily cf, int toDiscard, ColumnFamily copy, Iterator<Column> iter, DeletionInfo.InOrderTester tester)
    {
        // Redoing the counting like that is not extremely efficient.
View Full Code Here

Examples of org.apache.cassandra.db.filter.ColumnCounter.live()

        // Discard the last 'toDiscard' live (so stop adding as sound as we're past 'liveCount - toDiscard')
        while (iter.hasNext())
        {
            Column c = iter.next();
            counter.count(c, tester);
            if (counter.live() > liveCount - toDiscard)
                break;

            copy.addColumn(c);
        }
        return Math.min(liveCount, toDiscard);
View Full Code Here

Examples of org.apache.cassandra.db.filter.ColumnCounter.live()

        {
            List<Row> next = pager.fetchPage(pageSize);
            if (!next.isEmpty())
                counter.countAll(next.get(0).cf);
        }
        return counter.live();
    }
}
View Full Code Here

Examples of org.apache.cassandra.db.filter.ColumnCounter.live()

        // Discard the first 'toDiscard' live
        while (iter.hasNext())
        {
            Column c = iter.next();
            counter.count(c, tester);
            if (counter.live() > toDiscard)
            {
                copy.addColumn(c);
                while (iter.hasNext())
                    copy.addColumn(iter.next());
            }
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.