public class FailoverListManagerBean extends Object implements FailoverListManagerLocal
FailoverList objects that are sent down to the connected agents. The agents
then use these lists to determine which server to fail over to, if their primary server
is unreachable and/or goes down.| Constructor and Description |
|---|
FailoverListManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteServerListDetailsForServer(int serverId)
For a server being deleted it is necessary to remove server lists details referencing the server.
|
void |
deleteServerListsForAgent(org.rhq.core.domain.resource.Agent agent)
For an agent being deleted it is necessary to remove server lists for the agent.
|
org.rhq.core.domain.cloud.composite.FailoverListComposite |
getExistingForSingleAgent(String agentName)
Returns the existing server list for the specified agent, if it exists.
|
org.rhq.core.domain.cloud.composite.FailoverListComposite |
getForSingleAgent(org.rhq.core.domain.cloud.PartitionEvent event,
String agentName)
Note that load is balanced as best as possible without a full refresh.
|
Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> |
refresh(org.rhq.core.domain.cloud.PartitionEvent event)
Performs a full repartition, re-balancing the agent load on available servers and generating new server lists
for every agent.
|
Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> |
refresh(org.rhq.core.domain.cloud.PartitionEvent event,
List<org.rhq.core.domain.cloud.Server> servers,
List<org.rhq.core.domain.resource.Agent> agents)
Primarily a testing entry point.
|
public org.rhq.core.domain.cloud.composite.FailoverListComposite getExistingForSingleAgent(String agentName)
FailoverListManagerLocalgetExistingForSingleAgent in interface FailoverListManagerLocalpublic org.rhq.core.domain.cloud.composite.FailoverListComposite getForSingleAgent(org.rhq.core.domain.cloud.PartitionEvent event,
String agentName)
FailoverListManagerLocalgetForSingleAgent in interface FailoverListManagerLocalevent - the partition event prompting this get/create.public Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> refresh(org.rhq.core.domain.cloud.PartitionEvent event)
FailoverListManagerLocalPerforms a full repartition, re-balancing the agent load on available servers and generating new server lists for every agent. Previous server lists are deleted from the database and the new server lists are persisted.
Currently assigns to all known agents. This seems right even though some "down" agents may be dead and never come back online. That is really a separate design decision and is subject to change.
refresh in interface FailoverListManagerLocalpublic Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> refresh(org.rhq.core.domain.cloud.PartitionEvent event, List<org.rhq.core.domain.cloud.Server> servers, List<org.rhq.core.domain.resource.Agent> agents)
FailoverListManagerLocalrefresh in interface FailoverListManagerLocalpublic void deleteServerListsForAgent(org.rhq.core.domain.resource.Agent agent)
FailoverListManagerLocalThis is primarily a test entry point as of 1.1.0 since we currently never delete agents from the database.
deleteServerListsForAgent in interface FailoverListManagerLocalpublic void deleteServerListDetailsForServer(int serverId)
FailoverListManagerLocaldeleteServerListDetailsForServer in interface FailoverListManagerLocalCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.