Package org.apache.axis2.clustering.management

Examples of org.apache.axis2.clustering.management.GroupManagementAgent


                        String domain = tenantCtxt.getDomain();
                        String subDomain = tenantCtxt.getSubDomain();

                        if (clusteringAgent.getGroupManagementAgent(domain, subDomain) == null) {
                            String gmAgentClass = lbConfig.getLoadBalancerConfig().getGroupManagementAgentClass();
                            GroupManagementAgent groupManagementAgent;
                            if (gmAgentClass != null) {
                                try {
                                    groupManagementAgent = (GroupManagementAgent) Class.forName(gmAgentClass).newInstance();
                                } catch (Exception e) {
                                    String msg = "Cannot instantiate GroupManagementAgent. Class: " + gmAgentClass;
View Full Code Here


                                                                                  uuid);

    ClusteringAgent clusteringAgent =
                                      DataHolder.getServerConfigContext()
                                                .getAxisConfiguration().getClusteringAgent();
    GroupManagementAgent groupMgtAgent =
                                         clusteringAgent.getGroupManagementAgent(clusterDomain,
                                                                                 clusterSubdomain);

    try {
      log.info("Sending Request to.. " + clusterDomain + " : " + clusterSubdomain);
      groupMgtAgent.send(request);
     
    } catch (ClusteringFault e) {
      e.printStackTrace();
    }
    
View Full Code Here

    private static List<Member> getMemberInstances(String domain, String subDomain) {

        ClusteringAgent clusteringAgent = DataHolder.getServerConfigContext()
                .getAxisConfiguration().getClusteringAgent();
        GroupManagementAgent groupMgtAgent = clusteringAgent.getGroupManagementAgent(domain, subDomain);

        if (groupMgtAgent == null) {
            log.warn("Group Management Agent not found for domain : " + domain +
                    ", sub domain : " + subDomain);
            return null;
        }

        List<Member> members = groupMgtAgent.getMembers();
        if (members == null || members.isEmpty()) {
            return null;
        }

        return members;
View Full Code Here

    private static final Log log = LogFactory.getLog(ClusterAdmin.class);

    public GroupMember[] getMembers(String groupName) throws Exception {
        ClusteringAgent clusteringAgent = getClusteringAgent();
        GroupManagementAgent groupManagementAgent =
                clusteringAgent.getGroupManagementAgent(groupName);
        if (groupManagementAgent == null) {
            handleException("No GroupManagementAgent defined for domain " + groupName);
            return null;
        }
        List<Member> members = groupManagementAgent.getMembers();
        GroupMember[] groupMembers = new GroupMember[members.size()];
        int i = 0;
        for (Member member : members) {
            GroupMember groupMember = new GroupMember();
            groupMember.setHostName(member.getHostName());
View Full Code Here

        List<Group> groups = new ArrayList<Group>();
        Set<String> groupNames = clusteringAgent.getDomains();
        for (String groupName : groupNames) {
            Group group = new Group();
            group.setName(groupName);
            GroupManagementAgent gmAgent = clusteringAgent.getGroupManagementAgent(groupName);
            List<Member> memberList = gmAgent.getMembers();
            group.setDescription(gmAgent.getDescription());
            group.setNumberOfMembers(memberList.size());
            groups.add(group);
        }
        return groups.toArray(new Group[groups.size()]);
    }
View Full Code Here

        }
        return groups.toArray(new Group[groups.size()]);
    }

    public void shutdownGroup(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new ShutdownMemberCommand());
    }
View Full Code Here

        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new ShutdownMemberCommand());
    }

    public void restartGroup(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new RestartMemberCommand());
    }
View Full Code Here

        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new RestartMemberCommand());
    }

    public void shutdownGroupGracefully(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new ShutdownMemberGracefullyCommand());
    }
View Full Code Here

        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new ShutdownMemberGracefullyCommand());
    }

    public void restartGroupGracefully(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new RestartMemberGracefullyCommand());
    }
View Full Code Here

    public void restartClusterGracefully() throws Exception {
        sendToCluster(new RestartMemberGracefullyCommand());
    }

    public void startGroupMaintenance(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new StartMaintenanceCommand());
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.clustering.management.GroupManagementAgent

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.