Package com.hazelcast.cluster.impl

Examples of com.hazelcast.cluster.impl.ClusterServiceImpl


                final NodeEngineImpl nodeEngine = nodes.get(address);
                if (nodeEngine != null && nodeEngine.isActive()) {
                    nodeEngine.getExecutionService().execute(ExecutionService.SYSTEM_EXECUTOR, new Runnable() {
                        public void run() {
                            final ClusterServiceImpl clusterService = (ClusterServiceImpl) nodeEngine.getClusterService();
                            clusterService.removeAddress(node.getThisAddress());
                        }
                    });
                }
            }
        }
View Full Code Here


    public AddMembershipListenerRequest() {
    }

    @Override
    public Object call() throws Exception {
        ClusterServiceImpl service = getService();
        ClientEndpoint endpoint = getEndpoint();
        String registrationId = service.addMembershipListener(new MembershipListenerImpl(endpoint));
        String name = ClusterServiceImpl.SERVICE_NAME;
        endpoint.setListenerRegistration(name, name, registrationId);

        Collection<MemberImpl> memberList = service.getMemberList();
        Collection<Data> response = new ArrayList<Data>(memberList.size());
        for (MemberImpl member : memberList) {
            response.add(serializationService.toData(member));
        }
        return new SerializableCollection(response);
View Full Code Here

        nodeEngine.getEventService().deregisterAllListeners(SERVICE_NAME, name);
    }

    public Set<Data> localKeySet(String name) {
        Set<Data> keySet = new HashSet<Data>();
        ClusterServiceImpl clusterService = (ClusterServiceImpl) nodeEngine.getClusterService();
        Address thisAddress = clusterService.getThisAddress();
        for (int i = 0; i < nodeEngine.getPartitionService().getPartitionCount(); i++) {
            InternalPartition partition = nodeEngine.getPartitionService().getPartition(i);
            MultiMapPartitionContainer partitionContainer = getPartitionContainer(i);
            MultiMapContainer multiMapContainer = partitionContainer.getCollectionContainer(name);
            if (multiMapContainer == null) {
View Full Code Here

        LocalMultiMapStatsImpl stats = getLocalMultiMapStatsImpl(name);
        long ownedEntryCount = 0;
        long backupEntryCount = 0;
        long hits = 0;
        long lockedEntryCount = 0;
        ClusterServiceImpl clusterService = (ClusterServiceImpl) nodeEngine.getClusterService();

        Address thisAddress = clusterService.getThisAddress();
        for (int i = 0; i < nodeEngine.getPartitionService().getPartitionCount(); i++) {
            InternalPartition partition = nodeEngine.getPartitionService().getPartition(i);
            MultiMapPartitionContainer partitionContainer = getPartitionContainer(i);
            MultiMapContainer multiMapContainer = partitionContainer.getCollectionContainer(name);
            if (multiMapContainer == null) {
View Full Code Here

            securityContext = config.getSecurityConfig().isEnabled() ? nodeExtension.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);
            nodeExtension.printNodeInfo(this);
            versionCheck.check(this, getBuildInfo().getVersion(), buildInfo.isEnterprise());
            this.multicastService = createMulticastService(addressPicker);
            initializeListeners(config);
View Full Code Here

                final MemberImpl member = entry.getKey();
                if (members.contains(member)) {
                    HazelcastInstanceImpl instance = entry.getValue();
                    if (instance.node.isActive()) {
                        try {
                            ClusterServiceImpl clusterService = instance.node.clusterService;
                            final String id = clusterService.addMembershipListener(new ShutdownMembershipListener());
                            registrations.put(id, instance);
                        } catch (Throwable ignored) {
                        }
                    }
                }
View Full Code Here

        this.joinMessage = joinMessage;
    }

    @Override
    public void run() {
        ClusterServiceImpl cm = getService();
        cm.answerMasterQuestion(joinMessage);
    }
View Full Code Here

        this.joinRequest = joinRequest;
    }

    @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) {
            }
        }
        if (ok) {
            response = node.createJoinRequest();
View Full Code Here

        this.request = request;
    }

    @Override
    public void run() {
        ClusterServiceImpl cm = getService();
        cm.handleJoinRequest(request, getConnection());
    }
View Full Code Here

        this.masterAddress = originAddress;
    }

    @Override
    public void run() {
        ClusterServiceImpl clusterService = getService();
        clusterService.handleMaster(masterAddress, getCallerAddress());
    }
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.