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

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.lifecycle.Lifecycle
          extended by org.eclipse.emf.cdo.server.net4j.FailoverAgent
All Implemented Interfaces:
CDOSessionConfigurationFactory, INotifier, ILifecycle, ILifecycle.DeferrableActivation

public abstract class FailoverAgent
extends Lifecycle
implements CDOSessionConfigurationFactory

A repository-side agent for a fail-over monitor.

Since:
4.0

Nested Class Summary
static class FailoverAgent.Protocol
          The agent-side implementation of the fail-over monitor protocol.
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
 
Field Summary
 
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL
 
Constructor Summary
FailoverAgent()
           
 
Method Summary
 CDOSessionConfiguration createSessionConfiguration()
           
protected abstract  CDOSessionConfiguration createSessionConfiguration(String connectorDescription, String repositoryName)
           
protected  void doActivate()
           
protected  void doBeforeActivate()
           
protected  void doDeactivate()
           
 String getConnectorDescription()
           
protected  IManagedContainer getContainer()
           
 String getGroup()
           
 IConnector getMonitorConnector()
           
 FailoverAgent.Protocol getProtocol()
           
 long getRate()
           
 ISynchronizableRepository getRepository()
           
 long getTimeout()
           
 Timer getTimer()
           
protected  void setBackup(String connectorDescription, String repositoryName)
           
 void setConnectorDescription(String connectorDescription)
           
 void setGroup(String group)
           
protected  void setMaster()
           
 void setMonitorConnector(IConnector connector)
           
 void setRate(long rate)
           
 void setRepository(ISynchronizableRepository repository)
           
 void setTimeout(long timeout)
           
 void setTimer(Timer timer)
           
 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, fireEvent, fireEvent, 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
 

Constructor Detail

FailoverAgent

public FailoverAgent()
Method Detail

getMonitorConnector

public IConnector getMonitorConnector()

setMonitorConnector

public void setMonitorConnector(IConnector connector)

getTimer

public Timer getTimer()

setTimer

public void setTimer(Timer timer)

getRate

public long getRate()

setRate

public void setRate(long rate)

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

getGroup

public String getGroup()

setGroup

public void setGroup(String group)

getConnectorDescription

public String getConnectorDescription()

setConnectorDescription

public void setConnectorDescription(String connectorDescription)

getRepository

public ISynchronizableRepository getRepository()

setRepository

public void setRepository(ISynchronizableRepository repository)

getProtocol

public FailoverAgent.Protocol getProtocol()

createSessionConfiguration

public CDOSessionConfiguration createSessionConfiguration()
Specified by:
createSessionConfiguration in interface CDOSessionConfigurationFactory

doBeforeActivate

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

doActivate

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

doDeactivate

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

setMaster

protected void setMaster()

setBackup

protected void setBackup(String connectorDescription,
                         String repositoryName)

createSessionConfiguration

protected abstract CDOSessionConfiguration createSessionConfiguration(String connectorDescription,
                                                                      String repositoryName)

getContainer

protected IManagedContainer getContainer()


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