Package com.hazelcast.cluster.impl

Examples of com.hazelcast.cluster.impl.ClusterServiceImpl


        this.deadAddress = deadAddress;
    }

    @Override
    public void run() {
        final ClusterServiceImpl clusterService = getService();
        final Address caller = getCallerAddress();
        if (caller != null
                && (caller.equals(deadAddress) || caller.equals(clusterService.getMasterAddress()))) {
            ILogger logger = getLogger();
            if (logger.isFinestEnabled()) {
                logger.finest("Removing " + deadAddress + ", called from " + caller);
            }
            clusterService.removeAddress(deadAddress);
        }
    }
View Full Code Here


        processMemberUpdate();
    }

    protected final void processMemberUpdate() {
        if (isValid()) {
            final ClusterServiceImpl clusterService = getService();
            clusterService.setMasterTime(masterTime);
            clusterService.updateMembers(memberInfos);
        }
    }
View Full Code Here

            clusterService.updateMembers(memberInfos);
        }
    }

    protected final boolean isValid() {
        final ClusterServiceImpl clusterService = getService();
        final Connection conn = getConnection();
        final Address masterAddress = conn != null ? conn.getEndPoint() : null;
        boolean isLocal = conn == null;
        return isLocal
                || (masterAddress != null && masterAddress.equals(clusterService.getMasterAddress()));
    }
View Full Code Here

        final Address endpoint = getCallerAddress();
        if (endpoint == null) {
            return;
        }

        final ClusterServiceImpl clusterService = getService();
        final ILogger logger = getNodeEngine().getLogger(MasterConfirmationOperation.class.getName());
        final MemberImpl member = clusterService.getMember(endpoint);
        if (member == null) {
            logger.warning("MasterConfirmation has been received from " + endpoint
                    + ", but it is not a member of this cluster!");
            OperationService operationService = getNodeEngine().getOperationService();
            operationService.send(new MemberRemoveOperation(clusterService.getThisAddress()), endpoint);
        } else {
            if (clusterService.isMaster()) {
                clusterService.acceptMasterConfirmation(member);
            } else {
                logger.warning(endpoint + " has sent MasterConfirmation, but this node is not master!");
            }
        }
    }
View Full Code Here

        processMemberUpdate();

        // 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());
            for (MemberImpl member : members) {
                if (!member.localMember()) {
                    PostJoinOperation operation = new PostJoinOperation(postJoinOperations);
                    Future f = operationService.createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME,
View Full Code Here

        this.value = value;
    }

    @Override
    public void run() throws Exception {
        final ClusterServiceImpl cs = getService();
        cs.updateMemberAttribute(getCallerUuid(), operationType, key, value);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.cluster.impl.ClusterServiceImpl

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.