public PartitionSupervisorFactory(
            IChangeFeedObserverFactory observerFactory,
            ILeaseManager leaseManager,
            ILeaseCheckpointer leaseCheckpointer,
            IPartitionProcessorFactory partitionProcessorFactory,
            ChangeFeedProcessorOptions options)
        {
            if (observerFactory == null)
            {
                throw new ArgumentNullException(nameof(observerFactory));
            }
            if (leaseManager == null)
            {
                throw new ArgumentNullException(nameof(leaseManager));
            }
            if (leaseCheckpointer == null)
            {
                throw new ArgumentNullException(nameof(leaseCheckpointer));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (partitionProcessorFactory == null)
            {
                throw new ArgumentNullException(nameof(partitionProcessorFactory));
            }

            this.observerFactory            = observerFactory;
            this.leaseManager               = leaseManager;
            this.leaseCheckpointer          = leaseCheckpointer;
            this.changeFeedProcessorOptions = options;
            this.partitionProcessorFactory  = partitionProcessorFactory;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the <see cref="IPartitionProcessorFactory"/> to be used to create <see cref="IPartitionProcessor"/> for partition processing.
 /// </summary>
 /// <param name="partitionProcessorFactory">The instance of <see cref="IPartitionProcessorFactory"/> to use.</param>
 /// <returns>The instance of <see cref="ChangeFeedProcessorBuilder"/> to use.</returns>
 public ChangeFeedProcessorBuilder WithPartitionProcessorFactory(IPartitionProcessorFactory partitionProcessorFactory)
 {
     if (partitionProcessorFactory == null)
     {
         throw new ArgumentNullException(nameof(partitionProcessorFactory));
     }
     this.partitionProcessorFactory = partitionProcessorFactory;
     return(this);
 }
Exemplo n.º 3
0
 public CheckpointPartitionProcessorFactoryAdapter(IPartitionProcessorFactory partitionProcessorFactory)
 {
     this.partitionProcessorFactory = partitionProcessorFactory;
 }