org.rhq.enterprise.server.cloud
Class PartitionEventManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.cloud.PartitionEventManagerBean
All Implemented Interfaces:
PartitionEventManagerLocal

public class PartitionEventManagerBean
extends Object
implements PartitionEventManagerLocal

This session beans acts as the underlying implementation 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. Each of these changes is captured as a PartitionEvent, and the distribution will either need to generated 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.

Author:
Joseph Marques, Jay Shaughnessy

Constructor Summary
PartitionEventManagerBean()
           
 
Method Summary
 org.rhq.core.domain.cloud.composite.FailoverListComposite agentPartitionEvent(org.rhq.core.domain.auth.Subject subject, String agentName, org.rhq.core.domain.cloud.PartitionEventType eventType, String eventDetail)
           
 void auditPartitionEvent(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.cloud.PartitionEventType eventType, String eventDetail)
          This call performs no partitioning activity, it only audits that some event has taken place that could affect, or contribute to, a future partitioning.
 Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> cloudPartitionEvent(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.cloud.PartitionEventType eventType, String eventDetail)
          This call performs a full repartitioning of the agent population at the time of the call.
 void cloudPartitionEventRequest(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.cloud.PartitionEventType eventType, String eventDetail)
          This call requests full repartitioning of the agent population by the recurring cluster manager job.
 void createPartitionEvent(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.cloud.PartitionEvent partitionEvent)
           
 void deletePartitionEvents(org.rhq.core.domain.auth.Subject subject, Integer[] partitionEventIds)
          This is primarily a test entry point.
 org.rhq.core.domain.cloud.PartitionEvent getPartitionEvent(org.rhq.core.domain.auth.Subject subject, int partitionEventId)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.cloud.PartitionEventDetails> getPartitionEventDetails(org.rhq.core.domain.auth.Subject subject, int partitionEventId, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.cloud.PartitionEvent> getPartitionEvents(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.cloud.PartitionEventType type, org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus status, String details, org.rhq.core.domain.util.PageControl pageControl)
           
 void processRequestedPartitionEvents()
          This call queries for and then processed all outstanding, requested partition events resulting from previous calls to cloudPartitionEventRequest.
 int purgeAllEvents(org.rhq.core.domain.auth.Subject subject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionEventManagerBean

public PartitionEventManagerBean()
Method Detail

agentPartitionEvent

public org.rhq.core.domain.cloud.composite.FailoverListComposite agentPartitionEvent(org.rhq.core.domain.auth.Subject subject,
                                                                                     String agentName,
                                                                                     org.rhq.core.domain.cloud.PartitionEventType eventType,
                                                                                     String eventDetail)
Specified by:
agentPartitionEvent in interface PartitionEventManagerLocal

createPartitionEvent

public void createPartitionEvent(org.rhq.core.domain.auth.Subject subject,
                                 org.rhq.core.domain.cloud.PartitionEvent partitionEvent)
Specified by:
createPartitionEvent in interface PartitionEventManagerLocal

cloudPartitionEvent

public Map<org.rhq.core.domain.resource.Agent,org.rhq.core.domain.cloud.composite.FailoverListComposite> cloudPartitionEvent(org.rhq.core.domain.auth.Subject subject,
                                                                                                                             org.rhq.core.domain.cloud.PartitionEventType eventType,
                                                                                                                             String eventDetail)
Description copied from interface: PartitionEventManagerLocal
This call performs a full repartitioning of the agent population at the time of the call.

Specified by:
cloudPartitionEvent in interface PartitionEventManagerLocal
eventDetail - Any useful information regarding the event generation. Should be suitable for display. Typically a relevant server name.

cloudPartitionEventRequest

public void cloudPartitionEventRequest(org.rhq.core.domain.auth.Subject subject,
                                       org.rhq.core.domain.cloud.PartitionEventType eventType,
                                       String eventDetail)
Description copied from interface: PartitionEventManagerLocal
This call requests full repartitioning of the agent population by the recurring cluster manager job.

Specified by:
cloudPartitionEventRequest in interface PartitionEventManagerLocal
eventDetail - Any useful information regarding the event generation. Should be suitable for display. Typically a relevant server name.

auditPartitionEvent

public void auditPartitionEvent(org.rhq.core.domain.auth.Subject subject,
                                org.rhq.core.domain.cloud.PartitionEventType eventType,
                                String eventDetail)
Description copied from interface: PartitionEventManagerLocal
This call performs no partitioning activity, it only audits that some event has taken place that could affect, or contribute to, a future partitioning. For example, SERVER_DOWN, AGENT_LOAD_CHANGE, etc.

Specified by:
auditPartitionEvent in interface PartitionEventManagerLocal
eventType - Can be any event type although typically a type used here will not also be used in a
eventDetail - Any useful information regarding the event generation. Should be suitable for display. Typically s relevant server or agent name. server list generating call.

deletePartitionEvents

public void deletePartitionEvents(org.rhq.core.domain.auth.Subject subject,
                                  Integer[] partitionEventIds)
Description copied from interface: PartitionEventManagerLocal
This is primarily a test entry point.

Specified by:
deletePartitionEvents in interface PartitionEventManagerLocal

purgeAllEvents

public int purgeAllEvents(org.rhq.core.domain.auth.Subject subject)
Specified by:
purgeAllEvents in interface PartitionEventManagerLocal

processRequestedPartitionEvents

public void processRequestedPartitionEvents()
Description copied from interface: PartitionEventManagerLocal
This call queries for and then processed all outstanding, requested partition events resulting from previous calls to cloudPartitionEventRequest.

Specified by:
processRequestedPartitionEvents in interface PartitionEventManagerLocal

getPartitionEvent

public org.rhq.core.domain.cloud.PartitionEvent getPartitionEvent(org.rhq.core.domain.auth.Subject subject,
                                                                  int partitionEventId)
Specified by:
getPartitionEvent in interface PartitionEventManagerLocal

getPartitionEvents

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.cloud.PartitionEvent> getPartitionEvents(org.rhq.core.domain.auth.Subject subject,
                                                                                                      org.rhq.core.domain.cloud.PartitionEventType type,
                                                                                                      org.rhq.core.domain.cloud.PartitionEvent.ExecutionStatus status,
                                                                                                      String details,
                                                                                                      org.rhq.core.domain.util.PageControl pageControl)
Specified by:
getPartitionEvents in interface PartitionEventManagerLocal

getPartitionEventDetails

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.cloud.PartitionEventDetails> getPartitionEventDetails(org.rhq.core.domain.auth.Subject subject,
                                                                                                                   int partitionEventId,
                                                                                                                   org.rhq.core.domain.util.PageControl pageControl)
Specified by:
getPartitionEventDetails in interface PartitionEventManagerLocal


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.