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, INotifier, IDeactivateable, ILifecycle, ILifecycle.DeferrableActivation

      public abstract class FailoverAgent
      extends Lifecycle
      implements CDOSessionConfigurationFactory

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

- - ### Nested Class Summary

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

      `ILifecycle.DeferrableActivation`

  - ### Field Summary

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

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FailoverAgent()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and 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()`
    `IManagedContainer` | `getContainer()`
    `java.lang.String` | `getGroup()`
    `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(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, fireEvent, fireEvent, fireEvent, fireThrowable, 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

    - #### getContainer

          public IManagedContainer getContainer()

      Since:
        4.1

    - #### getMonitorConnector

          public IConnector getMonitorConnector()

    - #### setMonitorConnector

          public void setMonitorConnector(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 `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doActivate

          protected void doActivate()
                             throws java.lang.Exception

      Overrides:
        `doActivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `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)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html