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);
							}
						});
			}
		}
示例#2
0
 public void RaiseNotifications(ReplicationConflictNotification obj)
 {
     Database.TransportState.Send(obj);
 }
		public void Send(ReplicationConflictNotification replicationConflictNotification)
		{
			var onOnReplicationConflictNotification = OnReplicationConflictNotification;
			if (onOnReplicationConflictNotification != null)
				onOnReplicationConflictNotification(replicationConflictNotification);
		}
示例#4
0
		public void Send(ReplicationConflictNotification replicationConflictNotification)
		{
			OnReplicationConflictNotification(this, replicationConflictNotification);
			foreach (var connectionState in connections)
			{
				connectionState.Value.Send(replicationConflictNotification);
			}
		}
示例#5
0
        public void Send(ReplicationConflictNotification replicationConflictNotification)
        {
            var value = new { Value = replicationConflictNotification, Type = "ReplicationConflictNotification" };

            if (watchAllReplicationConflicts <= 0)
            {
                return;
            }

            Enqueue(value);
        }