public interface FailoverListManagerLocal
| 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.
|
void deleteServerListsForAgent(org.rhq.core.domain.resource.Agent agent)
This is primarily a test entry point as of 1.1.0 since we currently never delete agents from the database.
agent - void deleteServerListDetailsForServer(int serverId)
server - org.rhq.core.domain.cloud.composite.FailoverListComposite getExistingForSingleAgent(String agentName)
agentName - IllegalArgumentException - if the agent is not registeredorg.rhq.core.domain.cloud.composite.FailoverListComposite getForSingleAgent(org.rhq.core.domain.cloud.PartitionEvent event,
String agentName)
event - the partition event prompting this get/create.agentName - IllegalArgumentException - if the agent is not registeredMap<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. 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.
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)
servers - agents - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.