示例#1
0
        public void Start(EncryptionSettingsProto encryptionSettings)
        {
            EncryptionOperation encryptionOperation;

            lock (Locker)
            {
                if (Queue.GetTask <EncryptionOperation>(GetCacheId()) != null)
                {
                    return;
                }
                encryptionOperation = FactoryOperation.CreateOperation(encryptionSettings, GetCacheId());
                Queue.QueueTask(encryptionOperation);
            }
        }
示例#2
0
 public EncryptionWorker(FactoryOperation factoryOperation)
 {
     Cache            = AscCache.Memory;
     Locker           = new object();
     FactoryOperation = factoryOperation;
 }
示例#3
0
 public EncryptionWorker(FactoryOperation factoryOperation, DistributedTaskQueueOptionsManager options)
 {
     Locker           = new object();
     FactoryOperation = factoryOperation;
     Queue            = options.Get <EncryptionOperation>();
 }
示例#4
0
 public EncryptionWorker(FactoryOperation factoryOperation, ICache cache)
 {
     Cache            = cache;
     Locker           = new object();
     FactoryOperation = factoryOperation;
 }