void TryResolveConflict(object obj, ReplicationConflictNotification conflictNotification)
		{
			if (conflictNotification.ItemType == ReplicationConflictTypes.DocumentReplicationConflict)
			{
				System.Threading.Tasks.Task.Factory.StartNew(() =>
					  tryResolveConflictByUsingRegisteredConflictListeners(conflictNotification.Id, conflictNotification.Etag, conflictNotification.Conflicts))
						.ContinueWith(t =>
						{
							t.AssertNotFailed();

							if (t.Result)
							{
								logger.Debug(
									"Document replication conflict for {0} was resolved by one of the registered conflict listeners",
									conflictNotification.Id);
							}
						});
			}
		}
Example #2
0
 public void RaiseNotifications(ReplicationConflictNotification obj)
 {
     Database.TransportState.Send(obj);
 }
		public void Send(ReplicationConflictNotification replicationConflictNotification)
		{
			var onOnReplicationConflictNotification = OnReplicationConflictNotification;
			if (onOnReplicationConflictNotification != null)
				onOnReplicationConflictNotification(replicationConflictNotification);
		}
Example #4
0
		public void Send(ReplicationConflictNotification replicationConflictNotification)
		{
			OnReplicationConflictNotification(this, replicationConflictNotification);
			foreach (var connectionState in connections)
			{
				connectionState.Value.Send(replicationConflictNotification);
			}
		}
Example #5
0
        public void Send(ReplicationConflictNotification replicationConflictNotification)
        {
            var value = new { Value = replicationConflictNotification, Type = "ReplicationConflictNotification" };

            if (watchAllReplicationConflicts <= 0)
            {
                return;
            }

            Enqueue(value);
        }