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