Package com.hazelcast.instance

Examples of com.hazelcast.instance.MemberImpl


        return eventService.deregisterListener(SERVICE_NAME, name, registrationId);
    }

    public void dispatchEvent(MultiMapEvent event, EventListener listener) {
        EntryListener entryListener = (EntryListener) listener;
        final MemberImpl member = nodeEngine.getClusterService().getMember(event.getCaller());
        EntryEvent entryEvent = new EntryEvent(event.getName(), member,
                event.getEventType().getType(), nodeEngine.toObject(event.getKey()), nodeEngine.toObject(event.getValue()));
        if (member == null) {
            if (logger.isLoggable(Level.INFO)) {
                logger.info("Dropping event " + entryEvent + " from unknown address:" + event.getCaller());
View Full Code Here


    public void memberAdded(MembershipServiceEvent event) {
    }

    @Override
    public void memberRemoved(MembershipServiceEvent event) {
        final MemberImpl member = event.getMember();
        final String uuid = member.getUuid();
        releaseLocksOf(uuid);
    }
View Full Code Here

        NodeEngine nodeEngine = getNodeEngine();
        if(nodeEngine == null){
            return false;
        }

        MemberImpl destination = nodeEngine.getClusterService().getMember(migrationInfo.getDestination());
        return destination == null;
    }
View Full Code Here

    private String getUUID() {
        return UuidUtil.buildRandomUuidString();
    }

    private Address getMemberAddress(Member member) {
        MemberImpl m = getContext().getClusterService().getMember(member.getUuid());
        if (m == null) {
            throw new HazelcastException(member + " is not available!!!");
        }
        return m.getAddress();
    }
View Full Code Here

            updateMembersRef();
            logger.info(membersString());
            final List<MembershipEvent> events = new LinkedList<MembershipEvent>();
            final Set<Member> eventMembers = Collections.unmodifiableSet(new LinkedHashSet<Member>(members));
            for (MemberImpl member : members) {
                final MemberImpl former = prevMembers.remove(member.getUuid());
                if (former == null) {
                    events.add(new MembershipEvent(client.getCluster(), member, MembershipEvent.MEMBER_ADDED, eventMembers));
                }
            }
            for (MemberImpl member : prevMembers.values()) {
View Full Code Here

            while (!Thread.currentThread().isInterrupted()) {
                final Data clientResponseData = conn.read();
                final ClientResponse clientResponse = serializationService.toObject(clientResponseData);
                final Object eventObject = serializationService.toObject(clientResponse.getResponse());
                final ClientMembershipEvent event = (ClientMembershipEvent) eventObject;
                final MemberImpl member = (MemberImpl) event.getMember();
                boolean membersUpdated = false;
                if (event.getEventType() == MembershipEvent.MEMBER_ADDED) {
                    members.add(member);
                    membersUpdated = true;
                } else if (event.getEventType() == ClientMembershipEvent.MEMBER_REMOVED) {
View Full Code Here

        final BackupMigrationTask backupTask;

        MigrateTask(MigrationInfo migrationInfo, BackupMigrationTask backupTask) {
            this.migrationInfo = migrationInfo;
            this.backupTask = backupTask;
            final MemberImpl masterMember = getMasterMember();
            if (masterMember != null) {
                migrationInfo.setMasterUuid(masterMember.getUuid());
                migrationInfo.setMaster(masterMember.getAddress());
            }
        }
View Full Code Here

                            + partition + " -VS- " + info + " found owner:" + owner);
                    return;
                }
                sendMigrationEvent(migrationInfo, MigrationStatus.STARTED);
                Boolean result = Boolean.FALSE;
                MemberImpl fromMember = getMember(migrationInfo.getSource());
                if (logger.isFinestEnabled()) {
                    logger.finest("Started Migration : " + migrationInfo);
                }
                systemLogService.logPartition("Started Migration : " + migrationInfo);
                if (fromMember == null) {
View Full Code Here

                    case DATA:
                        return new Data();
                    case ADDRESS:
                        return new Address();
                    case MEMBER:
                        return new MemberImpl();
                    case HEARTBEAT:
                        return new HeartbeatOperation();
                    case CONFIG_CHECK:
                        return new ConfigCheck();
                    case MEMBERSHIP_EVENT:
View Full Code Here

    public void memberAdded(MembershipServiceEvent event) {
    }

    @Override
    public void memberRemoved(MembershipServiceEvent event) {
        final MemberImpl member = event.getMember();
        final String uuid = member.getUuid();
        releaseLocksOf(uuid);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.instance.MemberImpl

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.