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.

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])(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.

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. final def asInstanceOf[T0]: T0

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

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

    Permalink

    Replication connections to other replication endpoints.

  8. 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.
  9. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink

    Unique replication endpoint id.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. 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.

  17. def logId(logName: String): String

    Permalink

    Returns the unique log id for given logName.

  18. val logNames: Set[String]

    Permalink

    Names of the event logs managed by this replication endpoint.

  19. val logs: Map[String, ActorRef]

    Permalink

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  23. 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. Recovery is idempotent and must be repeated in failure cases by the application. After successful recovery the endpoint is automatically activated. Activating this endpoint without having successfully recovered from partial or total event loss may result in inconsistent replica states.

  24. val settings: ReplicationSettings

    Permalink

    The actor system's replication settings.

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

    Permalink
    Definition Classes
    AnyRef
  26. implicit val system: ActorSystem

    Permalink
  27. def toString(): String

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped