Package org.apache.activegroups.command

Examples of org.apache.activegroups.command.AsyncMapRequest


    }

    boolean callElection() {
        List<Member> members = new ArrayList<Member>(this.members.values());
        List<Member> sorted = sortMemberList(members);
        AsyncMapRequest request = new AsyncMapRequest();
        boolean doCall = false;
        for (Member member : sorted) {
            if (this.local.equals(member)) {
                doCall = true;
            } else if (doCall) {
                ElectionMessage msg = new ElectionMessage();
                msg.setMember(this.local);
                msg.setType(ElectionMessage.MessageType.ELECTION);
                sendAsyncStateRequest(request, member, msg);
            }
        }
        boolean result = request.isSuccess(getHeartBeatInterval());
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.activegroups.command.AsyncMapRequest

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.