Package org.eclipse.emf.cdo.server.net4j

## Class FailoverAgent

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.emf.cdo.server.net4j.FailoverAgent

- All Implemented Interfaces:
    `CDOSessionConfigurationFactory`, `org.eclipse.net4j.util.container.IManagedContainerProvider`, `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 abstract class FailoverAgent
      extends org.eclipse.net4j.util.lifecycle.Lifecycle
      implements CDOSessionConfigurationFactory, org.eclipse.net4j.util.container.IManagedContainerProvider

  A repository-side agent for a `fail-over monitor`.
  Since:
    4.0
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `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

      `org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `org.eclipse.net4j.util.event.INotifier.INotifier2`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FailoverAgent()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected IRepositorySynchronizer` | `createRepositorySynchronizer()` |
    `CDOSessionConfiguration` | `createSessionConfiguration()` |
    `protected abstract CDOSessionConfiguration` | `createSessionConfiguration​(java.lang.String connectorDescription, java.lang.String repositoryName)` |
    `protected void` | `doActivate()` |
    `protected void` | `doBeforeActivate()` |
    `protected void` | `doDeactivate()` |
    `java.lang.String` | `getConnectorDescription()` |
    `org.eclipse.net4j.util.container.IManagedContainer` | `getContainer()` |
    `java.lang.String` | `getGroup()` |
    `org.eclipse.net4j.connector.IConnector` | `getMonitorConnector()` |
    `FailoverAgent.Protocol` | `getProtocol()` |
    `long` | `getRate()` |
    `ISynchronizableRepository` | `getRepository()` |
    `long` | `getRepositoryActivationTimeout()` |
    `long` | `getTimeout()` |
    `java.util.Timer` | `getTimer()` |
    `protected void` | `setBackup​(java.lang.String connectorDescription, java.lang.String repositoryName)` |
    `void` | `setConnectorDescription​(java.lang.String connectorDescription)` |
    `void` | `setGroup​(java.lang.String group)` |
    `protected void` | `setMaster()` |
    `void` | `setMonitorConnector​(org.eclipse.net4j.connector.IConnector connector)` |
    `void` | `setRate​(long rate)` |
    `void` | `setRepository​(ISynchronizableRepository repository)` |
    `void` | `setRepositoryActivationTimeout​(long repositoryActivationTimeout)` |
    `void` | `setTimeout​(long timeout)` |
    `void` | `setTimer​(java.util.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, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, 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

    - #### getContainer

          public org.eclipse.net4j.util.container.IManagedContainer getContainer()

      Specified by:
        `getContainer` in interface `org.eclipse.net4j.util.container.IManagedContainerProvider`
      Since:
        4.1

    - #### getMonitorConnector

          public org.eclipse.net4j.connector.IConnector getMonitorConnector()

    - #### setMonitorConnector

          public void setMonitorConnector​(org.eclipse.net4j.connector.IConnector connector)

    - #### getTimer

          public java.util.Timer getTimer()

    - #### setTimer

          public void setTimer​(java.util.Timer timer)

    - #### getRate

          public long getRate()

    - #### setRate

          public void setRate​(long rate)

    - #### getTimeout

          public long getTimeout()

    - #### setTimeout

          public void setTimeout​(long timeout)

    - #### getGroup

          public java.lang.String getGroup()

    - #### setGroup

          public void setGroup​(java.lang.String group)

    - #### getConnectorDescription

          public java.lang.String getConnectorDescription()

    - #### setConnectorDescription

          public void setConnectorDescription​(java.lang.String connectorDescription)

    - #### getRepository

          public ISynchronizableRepository getRepository()

    - #### setRepository

          public void setRepository​(ISynchronizableRepository repository)

    - #### getRepositoryActivationTimeout

          public long getRepositoryActivationTimeout()

      Since:
        4.1

    - #### setRepositoryActivationTimeout

          public void setRepositoryActivationTimeout​(long repositoryActivationTimeout)

      Since:
        4.1

    - #### getProtocol

          public FailoverAgent.Protocol getProtocol()

    - #### createSessionConfiguration

          public CDOSessionConfiguration createSessionConfiguration()

      Specified by:
        `createSessionConfiguration` in interface `CDOSessionConfigurationFactory`

    - #### doBeforeActivate

          protected void doBeforeActivate()
                                   throws java.lang.Exception

      Overrides:
        `doBeforeActivate` in class `org.eclipse.net4j.util.lifecycle.Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doActivate

          protected void doActivate()
                             throws java.lang.Exception

      Overrides:
        `doActivate` in class `org.eclipse.net4j.util.lifecycle.Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `org.eclipse.net4j.util.lifecycle.Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### setMaster

          protected void setMaster()

    - #### setBackup

          protected void setBackup​(java.lang.String connectorDescription,
                                   java.lang.String repositoryName)

    - #### createRepositorySynchronizer

          protected IRepositorySynchronizer createRepositorySynchronizer()

      Since:
        4.1

    - #### createSessionConfiguration

          protected abstract CDOSessionConfiguration createSessionConfiguration​(java.lang.String connectorDescription,
                                                                                java.lang.String repositoryName)