Beispiel #1
0
 public Task <bool> EnqueueOperationAsync(ShardWriteOperation data)
 {
     lock (queueLock)
     {
         OperationQueue.Add(SystemExtension.Clone(data));
     }
     return(Task.FromResult(true));
 }
Beispiel #2
0
 public bool Enqueue(BuildingOperation operation)
 {
     if (OperationQueue.Count == QUEUE_SIZE)
     {
         return(false);
     }
     OperationQueue.Add(operation);
     return(true);
 }
Beispiel #3
0
 public async Task <bool> EnqueueOperationAsync(ShardWriteOperation transaction)
 {
     lock (queueLock)
     {
         OperationQueue.Add(transaction);
     }
     if (_persistToDisk)
     {
         return(await _operationCacheRepository.EnqueueOperationAsync(transaction));
     }
     return(true);
 }