/// <summary> /// Returns <c>true</c> if this event did not happen before or at the given <c>vectorTime</c> /// and passes the given replication <c>filter</c>. /// </summary> public bool IsReplicable(VectorTime vectorTime, ReplicationFilter filter) => !IsBefore(vectorTime) && filter.Invoke(this);
/// <summary> /// Returns <c>true</c> if this event happened before or at the given <paramref name="vectorTime"/>. /// </summary> public bool IsBefore(VectorTime vectorTime) => VectorTimestamp <= vectorTime;
private void Write(IReadOnlyCollection <DurableEvent> events, long replicationProgress, VectorTime currentSourceVersionVector, bool continueReplication) { var metadata = ImmutableDictionary <string, ReplicationMetadata> .Empty.SetItem(source.LogId, new ReplicationMetadata(replicationProgress, currentSourceVersionVector)); target.Log.Ask(new ReplicationWrite(events, metadata, continueReplication), timeout: settings.WriteTimeout) .PipeTo(Self, failure: error => new ReplicationWriteFailure(error)); }