public FlashSalePlanAppService( IFlashSalePlanRepository flashSalePlanRepository, IProductAppService productAppService, IDistributedCache <FlashSalePlanPreOrderCacheItem> tokenDistributedCache, IDistributedCache <FlashSalePlanCacheItem, Guid> planDistributedCache, IDistributedEventBus distributedEventBus, IFlashSaleResultRepository flashSaleResultRepository, IAbpDistributedLock distributedLock, IFlashSalePlanHasher flashSalePlanHasher, IFlashSaleInventoryManager flashSaleInventoryManager, IDistributedCache distributedCache, IOptionsMonitor <FlashSalesOptions> optionsMonitor) : base(flashSalePlanRepository) { FlashSalePlanRepository = flashSalePlanRepository; ProductAppService = productAppService; PreOrderDistributedCache = tokenDistributedCache; PlanDistributedCache = planDistributedCache; DistributedEventBus = distributedEventBus; FlashSaleResultRepository = flashSaleResultRepository; DistributedLock = distributedLock; FlashSalePlanHasher = flashSalePlanHasher; FlashSaleInventoryManager = flashSaleInventoryManager; DistributedCache = distributedCache; Options = optionsMonitor.CurrentValue; }
public TokenCleanupBackgroundWorker( AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, IOptionsMonitor <TokenCleanupOptions> cleanupOptions, IAbpDistributedLock distributedLock) : base(timer, serviceScopeFactory) { DistributedLock = distributedLock; timer.Period = cleanupOptions.CurrentValue.CleanupPeriod; }
public DefaultProductInventoryProvider( IGuidGenerator guidGenerator, ICurrentTenant currentTenant, IDistributedEventBus distributedEventBus, IProductInventoryRepository productInventoryRepository, IAbpDistributedLock distributedLock, ILogger <DefaultProductInventoryProvider> logger) { _guidGenerator = guidGenerator; _currentTenant = currentTenant; _distributedEventBus = distributedEventBus; _productInventoryRepository = productInventoryRepository; _distributedLock = distributedLock; _logger = logger; }
public BackgroundJobWorker( AbpAsyncTimer timer, IOptions <AbpBackgroundJobOptions> jobOptions, IOptions <AbpBackgroundJobWorkerOptions> workerOptions, IServiceScopeFactory serviceScopeFactory, IAbpDistributedLock distributedLock) : base( timer, serviceScopeFactory) { DistributedLock = distributedLock; WorkerOptions = workerOptions.Value; JobOptions = jobOptions.Value; Timer.Period = WorkerOptions.JobPollPeriod; }
public OutboxSender( IServiceProvider serviceProvider, AbpAsyncTimer timer, IDistributedEventBus distributedEventBus, IAbpDistributedLock distributedLock, IOptions <AbpEventBusBoxesOptions> eventBusBoxesOptions) { ServiceProvider = serviceProvider; DistributedEventBus = distributedEventBus; DistributedLock = distributedLock; EventBusBoxesOptions = eventBusBoxesOptions.Value; Timer = timer; Timer.Period = Convert.ToInt32(EventBusBoxesOptions.PeriodTimeSpan.TotalMilliseconds); Timer.Elapsed += TimerOnElapsed; Logger = NullLogger <OutboxSender> .Instance; StoppingTokenSource = new CancellationTokenSource(); StoppingToken = StoppingTokenSource.Token; }
public LocalDistributedLock_Tests() { _distributedLock = GetRequiredService <IAbpDistributedLock>(); }