Package com.hazelcast.spi.impl

Examples of com.hazelcast.spi.impl.NodeEngineImpl


            invokeOnAllMembers(operation);
        }
    }

    private void invokeOnAllMembers(Operation operation) {
        NodeEngineImpl nodeEngine = instance.node.nodeEngine;
        OperationService os = nodeEngine.getOperationService();
        String uuid = nodeEngine.getLocalMember().getUuid();
        operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
        try {
            for (MemberImpl member : nodeEngine.getClusterService().getMemberList()) {
                if (!member.localMember()) {
                    os.send(operation, member.getAddress());
                } else {
                    os.executeOperation(operation);
                }
View Full Code Here


            // Post join operations must be lock free; means no locks at all;
            // no partition locks, no key-based locks, no service level locks!

            final ClusterServiceImpl clusterService = getService();
            final NodeEngineImpl nodeEngine = clusterService.getNodeEngine();
            final Operation[] postJoinOperations = nodeEngine.getPostJoinOperations();
            final OperationService operationService = nodeEngine.getOperationService();

            Collection<Future> calls = null;
            if (postJoinOperations != null && postJoinOperations.length > 0) {
                final Collection<MemberImpl> members = clusterService.getMemberList();
                calls = new ArrayList<Future>(members.size());
View Full Code Here

        @Override
        public void handleException(Throwable throwable) {
            if (throwable instanceof ExecutionException) {
                final ClusterServiceImpl clusterService = getService();
                final NodeEngineImpl nodeEngine = clusterService.getNodeEngine();
                final ILogger logger = nodeEngine.getLogger(FinalizeJoinOperation.class);
                if (logger.isFinestEnabled()) {
                    logger.finest("Error while executing post-join operations -> "
                            + throwable.getClass().getSimpleName() + "[" + throwable.getMessage() + "]", throwable);
                }
            }
View Full Code Here

        this.mapName = mapName;
    }

    @Override
    public boolean open(NodeEngine nodeEngine) {
        NodeEngineImpl nei = (NodeEngineImpl) nodeEngine;
        InternalPartitionService ps = nei.getPartitionService();
        MapService mapService = nei.getService(MapService.SERVICE_NAME);
        ss = nei.getSerializationService();
        Address partitionOwner = ps.getPartitionOwner(partitionId);
        if (partitionOwner == null) {
            return false;
        }
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(partitionId, mapName);
View Full Code Here

public class AuthenticationFailureOperation extends AbstractClusterOperation
        implements JoinOperation {

    @Override
    public void run() {
        final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        final Node node = nodeEngine.getNode();
        final ILogger logger = nodeEngine.getLogger("com.hazelcast.security");
        logger.severe("Authentication failed on master node! Node is going to shutdown now!");
        node.shutdown(true);
    }
View Full Code Here

    }

    @Override
    public void run() {
        final ClusterServiceImpl service = getService();
        final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        final Node node = nodeEngine.getNode();
        boolean ok = false;
        if (joinRequest != null && node.joined() && node.isActive()) {
            try {
                ok = service.validateJoinMessage(joinRequest);
            } catch (Exception ignored) {
View Full Code Here

        for (ClientEndpoint endpoint : endpoints) {
            endpointManager.removeEndpoint(endpoint, true);
        }
        engine.removeOwnershipMapping(clientUuid);

        NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        nodeEngine.onClientDisconnected(clientUuid);
        Collection<ClientAwareService> services = nodeEngine.getServices(ClientAwareService.class);
        for (ClientAwareService service : services) {
            service.clientDisconnected(clientUuid);
        }
    }
View Full Code Here

        this.reply = reply;
    }

    @Override
    public void run() {
        NodeEngineImpl ns = (NodeEngineImpl) getNodeEngine();
        TcpIpConnectionManager connectionManager = (TcpIpConnectionManager) ns.getNode().getConnectionManager();
        TcpIpConnection connection = (TcpIpConnection) getConnection();
        connectionManager.bind(connection, localAddress, targetAddress, reply);
    }
View Full Code Here

    }

    @Override
    public void run() {
        final Address caller = getCallerAddress();
        final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        final Node node = nodeEngine.getNode();
        final Address masterAddress = node.getMasterAddress();
        final ILogger logger = node.loggingService.getLogger(this.getClass().getName());
        boolean local = caller == null;
        if (!local && !caller.equals(masterAddress)) {
            logger.warning("Merge instruction sent from non-master endpoint: " + caller);
View Full Code Here

            } catch (Throwable ignored) {
            }
            throw ExceptionUtil.rethrow(e);
        }
        securityContext = config.getSecurityConfig().isEnabled() ? initializer.getSecurityContext() : null;
        nodeEngine = new NodeEngineImpl(this);
        clientEngine = new ClientEngineImpl(this);
        connectionManager = nodeContext.createConnectionManager(this, serverSocketChannel);
        partitionService = new InternalPartitionServiceImpl(this);
        clusterService = new ClusterServiceImpl(this);
        textCommandService = new TextCommandServiceImpl(this);
View Full Code Here

TOP

Related Classes of com.hazelcast.spi.impl.NodeEngineImpl

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.