|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.cloud.FailoverListManagerBean
public class FailoverListManagerBean
This session beans acts as the single interface with which the distribution algorithm
will interact. The distribution algorithm runs as a result of various changes in the
system including but not limited to: newly registering agents, currently connecting
agents, cloud membership changes (server added/removed), and redistributions according
to agent load. The result of the distribution algorithm is a single (or a set of)
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 Summary | |
|---|---|
FailoverListManagerBean()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FailoverListManagerBean()
| Method Detail |
|---|
public org.rhq.core.domain.cloud.composite.FailoverListComposite getExistingForSingleAgent(String agentName)
FailoverListManagerLocal
getExistingForSingleAgent in interface FailoverListManagerLocal
public org.rhq.core.domain.cloud.composite.FailoverListComposite getForSingleAgent(org.rhq.core.domain.cloud.PartitionEvent event,
String agentName)
FailoverListManagerLocal
getForSingleAgent 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 FailoverListManagerLocal
public 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)
FailoverListManagerLocal
refresh 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)
FailoverListManagerLocal
deleteServerListDetailsForServer in interface FailoverListManagerLocal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||