示例#1
0
 public ScriptedEventProcessorHost(
     string eventHubPath,
     string consumerGroupName,
     string eventHubConnectionString,
     string storageConnectionString,
     string leaseContainerName,
     TransportAbstraction.IHost host,
     TransportAbstraction.ISender sender,
     EventHubsConnections connections,
     TaskhubParameters parameters,
     NetheriteOrchestrationServiceSettings settings,
     EventHubsTraceHelper logger,
     string workerId)
 {
     this.eventHubPath             = eventHubPath;
     this.consumerGroupName        = consumerGroupName;
     this.eventHubConnectionString = eventHubConnectionString;
     this.storageConnectionString  = storageConnectionString;
     this.leaseContainerName       = leaseContainerName;
     this.host        = host;
     this.sender      = sender;
     this.connections = connections;
     this.parameters  = parameters;
     this.taskHubGuid = parameters.TaskhubGuid.ToByteArray();
     this.settings    = settings;
     this.logger      = logger;
     this.workerId    = workerId;
 }
示例#2
0
 public Partition(
     NetheriteOrchestrationService host,
     uint partitionId,
     Func <string, uint> partitionFunction,
     Func <uint> numberPartitions,
     TransportAbstraction.ISender batchSender,
     NetheriteOrchestrationServiceSettings settings,
     string storageAccountName,
     WorkItemQueue <ActivityWorkItem> activityWorkItemQueue,
     WorkItemQueue <OrchestrationWorkItem> orchestrationWorkItemQueue,
     LoadPublisher loadPublisher,
     WorkItemTraceHelper workItemTraceHelper)
 {
     this.host                       = host;
     this.PartitionId                = partitionId;
     this.PartitionFunction          = partitionFunction;
     this.NumberPartitions           = numberPartitions;
     this.BatchSender                = batchSender;
     this.Settings                   = settings;
     this.StorageAccountName         = storageAccountName;
     this.ActivityWorkItemQueue      = activityWorkItemQueue;
     this.OrchestrationWorkItemQueue = orchestrationWorkItemQueue;
     this.LoadPublisher              = loadPublisher;
     this.TraceHelper                = new PartitionTraceHelper(host.Logger, settings.LogLevelLimit, this.StorageAccountName, this.Settings.HubName, this.PartitionId);
     this.EventTraceHelper           = new EventTraceHelper(host.LoggerFactory, settings.EventLogLevelLimit, this);
     this.WorkItemTraceHelper        = workItemTraceHelper;
     this.stopwatch.Start();
 }
        public Client(
            NetheriteOrchestrationService host,
            Guid clientId,
            Guid taskHubGuid,
            TransportAbstraction.ISender batchSender,
            WorkItemTraceHelper workItemTraceHelper,
            CancellationToken shutdownToken)
        {
            this.host                = host;
            this.ClientId            = clientId;
            this.taskHubGuid         = taskHubGuid;
            this.traceHelper         = new ClientTraceHelper(host.Logger, host.Settings.LogLevelLimit, host.StorageAccountName, host.Settings.HubName, this.ClientId);
            this.workItemTraceHelper = workItemTraceHelper;
            this.account             = host.StorageAccountName;
            this.BatchSender         = batchSender;
            this.shutdownToken       = shutdownToken;
            this.ResponseTimeouts    = new BatchTimer <PendingRequest>(this.shutdownToken, this.Timeout, this.traceHelper.TraceTimerProgress);
            this.ResponseWaiters     = new ConcurrentDictionary <long, PendingRequest>();
            this.Fragments           = new Dictionary <string, MemoryStream>();
            this.ResponseTimeouts.Start("ClientTimer");
            this.workItemStopwatch = new Stopwatch();
            this.workItemStopwatch.Start();

            this.traceHelper.TraceProgress("Started");
        }