Package com.hazelcast.nio

Examples of com.hazelcast.nio.Address


    public boolean checkAssignedMembersAvailable() {
        return mapReduceService.checkAssignedMembersAvailable(keyAssignments.values());
    }

    public boolean assignKeyReducerAddress(Object key, Address address) {
        Address oldAssignment = keyAssignments.putIfAbsent(key, address);
        return oldAssignment == null || oldAssignment.equals(address);
    }
View Full Code Here


    private void processReducerFinished0(ReducingFinishedNotification notification) {
        String name = configuration.getName();
        String jobId = configuration.getJobId();
        int partitionId = notification.getPartitionId();
        Address reducerAddress = notification.getAddress();

        if (checkPartitionReductionCompleted(partitionId, reducerAddress)) {
            try {
                RequestPartitionResult result = mapReduceService
                        .processRequest(jobOwner, new RequestPartitionProcessed(name, jobId, partitionId, REDUCING), name);
View Full Code Here

        this(member.getAddress(), member.getUuid(), member.getAttributes());
    }

    @Override
    public void readData(ObjectDataInput in) throws IOException {
        address = new Address();
        address.readData(in);
        if (in.readBoolean()) {
            uuid = in.readUTF();
        }
        int size = in.readInt();
View Full Code Here

        this.newTargetAddress = newTargetAddress;
    }

    @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;
        }
View Full Code Here

    }

    @Override
    protected void readInternal(ObjectDataInput in) throws IOException {
        super.readInternal(in);
        newTargetAddress = new Address();
        newTargetAddress.readData(in);
    }
View Full Code Here

    @Override
    public void readData(ObjectDataInput in) throws IOException {
        packetVersion = in.readByte();
        buildNumber = in.readInt();
        address = new Address();
        address.readData(in);
        uuid = in.readUTF();
        configCheck = new ConfigCheck();
        configCheck.readData(in);
        memberCount = in.readInt();
View Full Code Here

        } else {
            if (!node.joined() && node.getMasterAddress() == null) {
                String masterHost = joinMessage.getAddress().getHost();
                if (trustedInterfaces.isEmpty() || matchAnyInterface(masterHost, trustedInterfaces)) {
                    //todo: why are we making a copy here of address?
                    Address masterAddress = new Address(joinMessage.getAddress());
                    node.setMasterAddress(masterAddress);
                } else {
                    logJoinMessageDropped(masterHost);
                }
            }else{
View Full Code Here

            return false;
        }
    }

    private boolean isMessageToSelf(JoinMessage joinMessage) {
        Address thisAddress = node.getThisAddress();
        return thisAddress == null || thisAddress.equals(joinMessage.getAddress());
    }
View Full Code Here

        int tryCount = 0;
        long joinStartTime = Clock.currentTimeMillis();
        long maxJoinMillis = node.getGroupProperties().MAX_JOIN_SECONDS.getInteger() * 1000;

        while (node.isActive() && !joined.get() && (Clock.currentTimeMillis() - joinStartTime < maxJoinMillis)) {
            Address masterAddressNow = getTargetAddress();
            if (masterAddressNow == null) {
                masterAddressNow = findMasterWithMulticast();
            }
            node.setMasterAddress(masterAddressNow);

View Full Code Here

    protected void setPartitions(InternalPartition[] partitions, Map<Address, Integer> addressIndexes) {
        for (InternalPartition partition : partitions) {
            ShortPartitionInfo partitionInfo = new ShortPartitionInfo(partition.getPartitionId());
            for (int index = 0; index < InternalPartition.MAX_REPLICA_COUNT; index++) {
                Address address = partition.getReplicaAddress(index);
                if (address == null) {
                    partitionInfo.addressIndexes[index] = -1;
                } else {
                    Integer knownIndex = addressIndexes.get(address);
                    if (knownIndex == null && index == 0) {
View Full Code Here

TOP

Related Classes of com.hazelcast.nio.Address

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.