Ejemplo n.º 1
0
 /// <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);
Ejemplo n.º 2
0
 /// <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;
Ejemplo n.º 3
0
        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));
        }