Package org.apache.axis2.clustering.control.wka

Examples of org.apache.axis2.clustering.control.wka.MemberListCommand


                // TODO: If we do not get a response within some time, try to recover from this fault
            }
            while (responses == null || responses.length == 0)// Wait until we've received at least one response

            for (Response response : responses) {
                MemberListCommand command = (MemberListCommand) response.getMessage();
                command.setMembershipManager(primaryMembershipManager);
                command.execute(null); // Set the list of current members

                // If the WKA member is not part of this group, remove it
                if (!TribesUtil.areInSameDomain(response.getSource(),
                                                primaryMembershipManager.getLocalMember())) {
                    primaryMembershipManager.memberDisappeared(response.getSource());
View Full Code Here


    private boolean sendMemberListToWellKnownMember(Member wkaMember) {
        /*if (wkaMember.isFailing() || wkaMember.isSuspect()) {
            return false;
        }*/
        // send the member list to it
        MemberListCommand memListCmd;
        try {
            memListCmd = new MemberListCommand();
            List<Member> members = new ArrayList<Member>(this.members);
            members.add(localMember); // Need to set the local member too
            memListCmd.setMembers(members.toArray(new Member[members.size()]));

            Response[] responses =
                    rpcMembershipChannel.send(new Member[]{wkaMember}, memListCmd,
                                              RpcChannel.ALL_REPLY,
                                              Channel.SEND_OPTIONS_ASYNCHRONOUS |
View Full Code Here

     *
     * @param member The member to whom the member list has to be sent
     */
    public void sendMemberList(Member member) {
        try {
            MemberListCommand memListCmd = new MemberListCommand();
            List<Member> members = new ArrayList<Member>(this.members);
            memListCmd.setMembers(members.toArray(new Member[members.size()]));
            rpcMembershipChannel.send(new Member[]{member}, memListCmd, RpcChannel.ALL_REPLY,
                                      Channel.SEND_OPTIONS_ASYNCHRONOUS |
                                      TribesConstants.MEMBERSHIP_MSG_OPTION, 10000);
            if (log.isDebugEnabled()) {
                log.debug("Sent MEMBER_LIST to " + TribesUtil.getName(member));
View Full Code Here

                wkaMembers.contains(member)) { // if it is a well-known member

                log.info("A WKA member " + TribesUtil.getName(member) +
                         " just joined the group. Sending MEMBER_LIST message.");
                // send the member list to it
                MemberListCommand memListCmd;
                try {
                    memListCmd = new MemberListCommand();
                    List<Member> members = new ArrayList<Member>(this.members);
                    members.add(localMember); // Need to set the local member too
                    memListCmd.setMembers(members.toArray(new Member[members.size()]));

                    Response[] responses =
                            rpcMembershipChannel.send(new Member[]{member}, memListCmd,
                                                      RpcChannel.ALL_REPLY,
                                                      Channel.SEND_OPTIONS_ASYNCHRONOUS |
View Full Code Here

     *
     * @param member The member to whom the member list has to be sent
     */
    public void sendMemberList(Member member) {
        try {
            MemberListCommand memListCmd = new MemberListCommand();
            List<Member> members = new ArrayList<Member>(this.members);
            memListCmd.setMembers(members.toArray(new Member[members.size()]));
            rpcMembershipChannel.send(new Member[]{member}, memListCmd, RpcChannel.ALL_REPLY,
                                      Channel.SEND_OPTIONS_ASYNCHRONOUS |
                                      TribesConstants.MEMBERSHIP_MSG_OPTION, 10000);
            if (log.isDebugEnabled()) {
                log.debug("Sent MEMBER_LIST to " + TribesUtil.getName(member));
View Full Code Here

                // TODO: If we do not get a response within some time, try to recover from this fault
            }
            while (responses == null || responses.length == 0)// Wait until we've received at least one response

            for (Response response : responses) {
                MemberListCommand command = (MemberListCommand) response.getMessage();
                command.setMembershipManager(primaryMembershipManager);
                command.execute(null); // Set the list of current members

                // If the WKA member is not part of this group, remove it
                if (!TribesUtil.areInSameDomain(response.getSource(),
                                                primaryMembershipManager.getLocalMember())) {
                    primaryMembershipManager.memberDisappeared(response.getSource());
View Full Code Here

                // TODO: If we do not get a response within some time, try to recover from this fault
            }
            while (responses == null || responses.length == 0)// Wait until we've received at least one response

            for (Response response : responses) {
                MemberListCommand command = (MemberListCommand) response.getMessage();
                command.setMembershipManager(primaryMembershipManager);
                command.execute(null); // Set the list of current members

                // If the WKA member is not part of this group, remove it
                if (!TribesUtil.areInSameDomain(response.getSource(),
                                                primaryMembershipManager.getLocalMember())) {
                    primaryMembershipManager.memberDisappeared(response.getSource());
View Full Code Here

                wkaMembers.contains(member)) { // if it is a well-known member

                log.info("A WKA member " + TribesUtil.getName(member) +
                         " just joined the group. Sending MEMBER_LIST message.");
                // send the member list to it
                MemberListCommand memListCmd;
                try {
                    memListCmd = new MemberListCommand();
                    List<Member> members = new ArrayList<Member>(this.members);
                    members.add(localMember); // Need to set the local member too
                    memListCmd.setMembers(members.toArray(new Member[members.size()]));

                    Response[] responses =
                            rpcMembershipChannel.send(new Member[]{member}, memListCmd,
                                                      RpcChannel.ALL_REPLY,
                                                      Channel.SEND_OPTIONS_ASYNCHRONOUS |
View Full Code Here

     *
     * @param member The member to whom the member list has to be sent
     */
    public void sendMemberList(Member member) {
        try {
            MemberListCommand memListCmd = new MemberListCommand();
            List<Member> members = new ArrayList<Member>(this.members);
            memListCmd.setMembers(members.toArray(new Member[members.size()]));
            rpcMembershipChannel.send(new Member[]{member}, memListCmd, RpcChannel.ALL_REPLY,
                                      Channel.SEND_OPTIONS_ASYNCHRONOUS |
                                      TribesConstants.MEMBERSHIP_MSG_OPTION, 10000);
            if (log.isDebugEnabled()) {
                log.debug("Sent MEMBER_LIST to " + TribesUtil.getName(member));
View Full Code Here

                // TODO: If we do not get a response within some time, try to recover from this fault
            }
            while (responses == null || responses.length == 0)// Wait until we've received at least one response

            for (Response response : responses) {
                MemberListCommand command = (MemberListCommand) response.getMessage();
                command.setMembershipManager(primaryMembershipManager);
                command.execute(null); // Set the list of current members

                // If the WKA member is not part of this group, remove it
                if (!TribesUtil.areInSameDomain(response.getSource(),
                                                primaryMembershipManager.getLocalMember())) {
                    primaryMembershipManager.memberDisappeared(response.getSource());
View Full Code Here

TOP

Related Classes of org.apache.axis2.clustering.control.wka.MemberListCommand

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.