Class/Object

com.rbmhtechnology.eventuate

ReplicationEndpoint

Related Docs: object ReplicationEndpoint | package eventuate

Permalink

class ReplicationEndpoint extends AnyRef

A replication endpoint connects to other replication endpoints for replicating events. Events are replicated from the connected endpoints to this endpoint. The connected endpoints are replication sources, this endpoint is a replication target. To setup bi-directional replication, the other replication endpoints must additionally setup replication connections to this endpoint.

A replication endpoint manages one or more event logs. Event logs are indexed by name. Events are replicated only between event logs with matching names.

If applicationName equals that of a replication source, events are only replicated if applicationVersion is greater than or equal to that of the replication source. This is a simple mechanism to support incremental version upgrades of replicated applications where each replica can be upgraded individually without shutting down other replicas. This avoids permanent state divergence during upgrade which may occur if events are replicated from replicas with higher version to those with lower version. If applicationName does not equal that of a replication source, events are always replicated, regardless of the applicationVersion value.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReplicationEndpoint
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReplicationEndpoint(id: String, logNames: Set[String], logFactory: (String) ⇒ Props, connections: Set[ReplicationConnection], endpointFilters: EndpointFilters = NoFilters, applicationName: String = ..., applicationVersion: ApplicationVersion = ...)(implicit system: ActorSystem)

    Permalink

    id

    Unique replication endpoint id.

    logNames

    Names of the event logs managed by this replication endpoint.

    logFactory

    Factory of log actor Props. The String parameter of the factory is a unique log id generated by this endpoint. The log actor must be assigned this log id.

    connections

    Replication connections to other replication endpoints.

    endpointFilters

    Replication filters applied to incoming replication read requests

    applicationName

    Name of the application that creates this replication endpoint.

    applicationVersion

    Version of the application that creates this replication endpoint.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def activate(): Unit

    Permalink

    Activates this endpoint by starting event replication from remote endpoints to this endpoint.

  5. val applicationName: String

    Permalink

    Name of the application that creates this replication endpoint.

  6. val applicationVersion: ApplicationVersion

    Permalink

    Version of the application that creates this replication endpoint.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val connections: Set[ReplicationConnection]

    Permalink

    Replication connections to other replication endpoints.

  10. def delete(logName: String, toSequenceNr: Long, remoteEndpointIds: Set[String]): Future[Long]

    Permalink

    Delete events from a local log identified by logName with a sequence number less than or equal to toSequenceNr.

    Delete events from a local log identified by logName with a sequence number less than or equal to toSequenceNr. Deletion is split into logical deletion and physical deletion. Logical deletion is supported by any storage backend and ensures that deleted events are not replayed any more. It has immediate effect. Logically deleted events can still be replicated to remote ReplicationEndpoints. They are only physically deleted if the storage backend supports that (currently LevelDB only). Furthermore, physical deletion only starts after all remote replication endpoints identified by remoteEndpointIds have successfully replicated these events. Physical deletion is implemented as reliable background process that survives event log restarts.

    Use with care! When events are physically deleted they cannot be replicated any more to new replication endpoints (i.e. those that were unknown at the time of deletion). Also, a location with deleted events may not be suitable any more for disaster recovery of other locations.

    logName

    Events are deleted from the local log with this name.

    toSequenceNr

    Sequence number up to which events shall be deleted (inclusive).

    remoteEndpointIds

    A set of remote ReplicationEndpoint ids that must have replicated events to their logs before they are allowed to be physically deleted at this endpoint.

    returns

    The sequence number up to which events have been logically deleted. When the returned Future completes logical deletion is effective. The returned sequence number can differ from the requested one, if:

    • the log's current sequence number is smaller than the requested number. In this case the current sequence number is returned.
    • there was a previous successful deletion request with a higher sequence number. In this case that number is returned.
  11. val endpointFilters: EndpointFilters

    Permalink

    Replication filters applied to incoming replication read requests

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. val id: String

    Permalink

    Unique replication endpoint id.

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val logFactory: (String) ⇒ Props

    Permalink

    Factory of log actor Props.

    Factory of log actor Props. The String parameter of the factory is a unique log id generated by this endpoint. The log actor must be assigned this log id.

  20. def logId(logName: String): String

    Permalink

    Returns the unique log id for given logName.

  21. val logNames: Set[String]

    Permalink

    Names of the event logs managed by this replication endpoint.

  22. val logs: Map[String, ActorRef]

    Permalink

    The log actors managed by this endpoint, indexed by their name.

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def recover(): Future[Unit]

    Permalink

    Runs an asynchronous disaster recovery procedure.

    Runs an asynchronous disaster recovery procedure. This procedure recovers this endpoint in case of total or partial event loss. Partial event loss means event loss from a given sequence number upwards (for example, after having installed a storage backup). Recovery copies events from directly connected remote endpoints back to this endpoint and automatically removes invalid snapshots. A snapshot is invalid if it covers events that have been lost.

    This procedure requires that event replication between this and directly connected endpoints is bi-directional and that these endpoints are available during recovery. After successful recovery the endpoint is automatically activated. A failed recovery completes with a RecoveryException and must be retried. Activating this endpoint without having successfully recovered from partial or total event loss may result in inconsistent replica states.

    Running a recovery on an endpoint that didn't loose events has no effect but may still fail due to unavailable replication partners, for example. In this case, a recovery retry can be omitted if the partialUpdate field of RecoveryException is set to false.

  27. val settings: ReplicationSettings

    Permalink

    The actor system's replication settings.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. implicit val system: ActorSystem

    Permalink
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped