org.eclipse.emf.cdo.server.net4j
Class FailoverMonitor

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.lifecycle.Lifecycle
          extended by org.eclipse.net4j.util.container.Container<FailoverMonitor.AgentProtocol>
              extended by org.eclipse.emf.cdo.server.net4j.FailoverMonitor
All Implemented Interfaces:
IContainer<FailoverMonitor.AgentProtocol>, INotifier, ILifecycle

public class FailoverMonitor
extends Container<FailoverMonitor.AgentProtocol>

Since:
4.0
Author:
Eike Stepper

Nested Class Summary
static class FailoverMonitor.AbstractServerProtocolFactory
           
static class FailoverMonitor.AgentProtocol
           
static class FailoverMonitor.ClientProtocol
           
static class FailoverMonitor.Factory
           
static interface FailoverMonitor.Provider
           
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>
 
Field Summary
static String PRODUCT_GROUP
           
static String PROTOCOL_NAME
           
static short SIGNAL_PUBLISH_MASTER
           
 
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL
 
Constructor Summary
FailoverMonitor()
           
 
Method Summary
 void deregisterAgent(FailoverMonitor.AgentProtocol agent)
           
protected  void doBeforeActivate()
           
protected  FailoverMonitor.AgentProtocol electNewMaster(List<FailoverMonitor.AgentProtocol> agents)
           
 FailoverMonitor.AgentProtocol[] getElements()
           
 String getGroup()
           
 FailoverMonitor.AgentProtocol getMasterAgent()
           
 void registerAgent(FailoverMonitor.AgentProtocol agent)
           
 void setGroup(String group)
           
 
Methods inherited from class org.eclipse.net4j.util.container.Container
fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, isEmpty, newContainerEvent, newContainerEvent
 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, 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.Notifier
addListener, fireEvent, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
 

Field Detail

PRODUCT_GROUP

public static final String PRODUCT_GROUP
See Also:
Constant Field Values

PROTOCOL_NAME

public static final String PROTOCOL_NAME
See Also:
Constant Field Values

SIGNAL_PUBLISH_MASTER

public static final short SIGNAL_PUBLISH_MASTER
See Also:
Constant Field Values
Constructor Detail

FailoverMonitor

public FailoverMonitor()
Method Detail

getGroup

public String getGroup()

setGroup

public void setGroup(String group)

getElements

public FailoverMonitor.AgentProtocol[] getElements()

getMasterAgent

public FailoverMonitor.AgentProtocol getMasterAgent()

registerAgent

public void registerAgent(FailoverMonitor.AgentProtocol agent)

deregisterAgent

public void deregisterAgent(FailoverMonitor.AgentProtocol agent)

doBeforeActivate

protected void doBeforeActivate()
                         throws Exception
Overrides:
doBeforeActivate in class Lifecycle
Throws:
Exception

electNewMaster

protected FailoverMonitor.AgentProtocol electNewMaster(List<FailoverMonitor.AgentProtocol> agents)


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.