public PartitionManager(string accountName, string taskHub, string workerName, ILeaseManager <T> leaseManager, PartitionManagerOptions options)
        {
            this.accountName  = accountName;
            this.taskHub      = taskHub;
            this.workerName   = workerName;
            this.leaseManager = leaseManager;
            this.options      = options;

            this.currentlyOwnedShards     = new ConcurrentDictionary <string, T>();
            this.keepRenewingDuringClose  = new ConcurrentDictionary <string, T>();
            this.partitionObserverManager = new PartitionObserverManager(this);
        }
Exemple #2
0
        public PartitionManager(AzureStorageOrchestrationServiceSettings settings, string accountName, string workerName, ILeaseManager <T> leaseManager, PartitionManagerOptions options)
        {
            this.accountName  = accountName;
            this.taskHub      = settings.TaskHubName;
            this.workerName   = workerName;
            this.leaseManager = leaseManager;
            this.options      = options;
            this.settings     = settings;

            this.currentlyOwnedShards     = new ConcurrentDictionary <string, T>();
            this.keepRenewingDuringClose  = new ConcurrentDictionary <string, T>();
            this.partitionObserverManager = new PartitionObserverManager(this);
        }