Package org.eclipse.emf.cdo.server.net4j
Class FailoverMonitor
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.net4j.util.lifecycle.ShareableLifecycle
- 
- org.eclipse.net4j.util.container.Container<FailoverMonitor.AgentProtocol>
- 
- org.eclipse.emf.cdo.server.net4j.FailoverMonitor
 
 
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.net4j.util.container.IContainer<FailoverMonitor.AgentProtocol>,- org.eclipse.net4j.util.event.INotifier,- org.eclipse.net4j.util.event.INotifier.INotifier2,- org.eclipse.net4j.util.lifecycle.IDeactivateable,- org.eclipse.net4j.util.lifecycle.ILifecycle,- org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 
 public class FailoverMonitor extends org.eclipse.net4j.util.container.Container<FailoverMonitor.AgentProtocol> A facility for monitoring a variable set offail-over participantrepositories and electing, as well as promoting, amasterrepository among them.- Since:
- 4.0
- Author:
- Eike Stepper
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFailoverMonitor.AbstractServerProtocolFactoryAn abstract base class for theserver-side protocol factoriesrequired by afail-over monitor.static classFailoverMonitor.AgentProtocolThe monitor-side implementation of thefail-over monitoragent protocol.static classFailoverMonitor.ClientProtocolThe monitor-side implementation of thefail-over monitorclient protocol.static classFailoverMonitor.FactoryCreatesfail-over monitorinstances.static interfaceFailoverMonitor.ProviderProvides afail-over monitorfor a given named fail-over group.- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainerorg.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringPRODUCT_GROUPstatic java.lang.StringPROTOCOL_NAMEstatic shortSIGNAL_PUBLISH_MASTER
 - 
Constructor SummaryConstructors Constructor Description FailoverMonitor()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterAgent(FailoverMonitor.AgentProtocol agent)protected voiddoBeforeActivate()protected FailoverMonitor.AgentProtocolelectNewMaster(java.util.List<FailoverMonitor.AgentProtocol> agents)FailoverMonitor.AgentProtocol[]getElements()java.lang.StringgetGroup()FailoverMonitor.AgentProtocolgetMasterAgent()booleanisEmpty()voidregisterAgent(FailoverMonitor.AgentProtocol agent)voidsetGroup(java.lang.String group)- 
Methods inherited from class org.eclipse.net4j.util.container.ContainerfireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent
 - 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
PRODUCT_GROUPpublic static final java.lang.String PRODUCT_GROUP - See Also:
- Constant Field Values
 
 - 
PROTOCOL_NAMEpublic static final java.lang.String PROTOCOL_NAME - See Also:
- Constant Field Values
 
 - 
SIGNAL_PUBLISH_MASTERpublic static final short SIGNAL_PUBLISH_MASTER - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getGrouppublic java.lang.String getGroup() 
 - 
setGrouppublic void setGroup(java.lang.String group) 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin interface- org.eclipse.net4j.util.container.IContainer<FailoverMonitor.AgentProtocol>
- Overrides:
- isEmptyin class- org.eclipse.net4j.util.container.Container<FailoverMonitor.AgentProtocol>
 
 - 
getElementspublic FailoverMonitor.AgentProtocol[] getElements() 
 - 
getMasterAgentpublic FailoverMonitor.AgentProtocol getMasterAgent() 
 - 
registerAgentpublic void registerAgent(FailoverMonitor.AgentProtocol agent) 
 - 
deregisterAgentpublic void deregisterAgent(FailoverMonitor.AgentProtocol agent) 
 - 
doBeforeActivateprotected void doBeforeActivate() throws java.lang.Exception- Overrides:
- doBeforeActivatein class- org.eclipse.net4j.util.lifecycle.Lifecycle
- Throws:
- java.lang.Exception
 
 - 
electNewMasterprotected FailoverMonitor.AgentProtocol electNewMaster(java.util.List<FailoverMonitor.AgentProtocol> agents) 
 
- 
 
-