Package com.hazelcast.instance

Examples of com.hazelcast.instance.Node


        return list;
    }

    @Override
    public void writeResponse(ManagementCenterService mcs, ObjectDataOutput dos) throws Exception {
        Node node = mcs.getHazelcastInstance().node;
        SystemLogService systemLogService = node.getSystemLogService();
        List<SystemLogRecord> logBundle = systemLogService.getLogBundle();
        Address address = node.getThisAddress();
        dos.writeUTF(address.getHost() + ":" + address.getPort());
        dos.writeInt(logBundle.size());
        for (SystemLogRecord systemLogRecord : logBundle) {
            systemLogRecord.writeData(dos);
        }
View Full Code Here


    }

    @Override
    public void writeResponse(ManagementCenterService managementCenterService, ObjectDataOutput dos) throws Exception {
        managementCenterService.signalVersionMismatch();
        Node node = managementCenterService.getHazelcastInstance().node;
        ILogger logger = node.getLogger(VersionMismatchLogRequest.class);
        //todo: does this message make sense because to the user it just displays version information we already know.
        //he has no clue that the management version is not matching with his own.
        logger.severe("The version of the management center is " + manCenterVersion);
    }
View Full Code Here

    }

    @Override
    public void writeResponse(ManagementCenterService mcs, ObjectDataOutput dos) throws Exception {
        HazelcastInstanceImpl instance = mcs.getHazelcastInstance();
        Node node = instance.node;
        ClusterServiceImpl cluster = node.getClusterService();
        InternalPartitionService partitionService = node.partitionService;
        Collection<LockResource> lockedRecords = collectLockState(instance);
        Map<Address, Connection> connectionMap = node.connectionManager.getReadonlyConnectionMap();

        ClusterRuntimeState clusterRuntimeState = new ClusterRuntimeState(
View Full Code Here

    private final NodeEngineImpl nodeEngine;
    private final ILogger logger;

    public WaitNotifyServiceImpl(final NodeEngineImpl nodeEngine) {
        this.nodeEngine = nodeEngine;
        final Node node = nodeEngine.getNode();
        logger = node.getLogger(WaitNotifyService.class.getName());

        String threadNamePrefix = node.getThreadNamePrefix("wait-notify");
        expirationService = Executors.newSingleThreadExecutor(
                new SingleExecutorThreadFactory(node.threadGroup, node.getConfigClassLoader(), threadNamePrefix));

        expirationTask = expirationService.submit(new ExpirationTask());
    }
View Full Code Here

                    }
                } else if (thisAddress.equals(newAddress)) {
                    partitionService.forcePartitionReplicaSync(partitionId, replicaIndex);
                }
            }
            Node node = partitionService.node;
            if (replicaIndex == 0 && newAddress == null && node.isActive() && node.joined()) {
                logOwnerOfPartitionIsRemoved(event);
            }
            if (partitionService.node.isMaster()) {
                partitionService.stateVersion.incrementAndGet();
            }
View Full Code Here

        this.nodeEngine = nodeEngine;
        this.logger = nodeEngine.getLogger(ServiceManager.class.getName());
    }

    synchronized void start() {
        final Node node = nodeEngine.getNode();
        // register core services
        logger.finest( "Registering core services...");
        registerService(ClusterServiceImpl.SERVICE_NAME, node.getClusterService());
        registerService(InternalPartitionService.SERVICE_NAME, node.getPartitionService());
        registerService(ProxyServiceImpl.SERVICE_NAME, nodeEngine.getProxyService());
        registerService(TransactionManagerServiceImpl.SERVICE_NAME, nodeEngine.getTransactionManagerService());
        registerService(ClientEngineImpl.SERVICE_NAME, node.clientEngine);

        final ServicesConfig servicesConfig = node.getConfig().getServicesConfig();
        final Map<String, Properties> serviceProps;
        final Map<String, Object> serviceConfigObjects;
        if (servicesConfig != null) {
            if (servicesConfig.isEnableDefaults()) {
                logger.finest( "Registering default services...");
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());
        if (caller != null && !caller.equals(masterAddress)) { // caller null means local invocation.
            logger.warning("Prepare-merge instruction sent from non-master endpoint: " + caller);
            return;
        }
        logger.warning("Preparing to merge... Waiting for merge instruction...");
        node.getClusterService().prepareToMerge(newTargetAddress);
    }
View Full Code Here

        setObjectName(properties);

        config = hazelcastInstance.getConfig();
        cluster = hazelcastInstance.getCluster();

        Node node = hazelcastInstance.node;
        ExecutionService executionService = node.nodeEngine.getExecutionService();

        nodeMBean = new NodeMBean(hazelcastInstance, node, managementService);
        register(nodeMBean);
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());
        if (caller != null && !caller.equals(masterAddress)) { // caller null means local invocation.
            logger.warning("Merge instruction sent from non-master endpoint: " + caller);
            return;
        }
        logger.warning(node.getThisAddress() + " is merging to " + newTargetAddress
                + ", because: instructed by master " + masterAddress);
        node.getClusterService().merge(newTargetAddress);
    }
View Full Code Here

        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

TOP

Related Classes of com.hazelcast.instance.Node

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.