Interface IKeyedOperationQueue
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
A queue that uses keys to determine the queue operations.
- Extension Methods
Methods
EnqueueObservableOperation<T>(string, Func<IObservable<T>>)
Queue an operation to run in the background that returns a stream of values. All operations with the same key will run in sequence, waiting for the previous operation to complete. If you want to queue an operation that already returns IObservable, this is your guy.
Parameters
key
stringThe key to use.
asyncCalculationFunc
Func<IObservable<T>>A method to run in the background that returns a stream of values.
Returns
- IObservable<T>
A future stream of values.
Type Parameters
T
The type of item to queue.
EnqueueOperation(string, Action)
Queue an operation to run in the background. All operations with the same key will run in sequence, waiting for the previous operation to complete.
Parameters
Returns
- IObservable<Unit>
A future representing when the operation completes.
EnqueueOperation<T>(string, Func<T>)
Queue an operation to run in the background that returns a value. All operations with the same key will run in sequence, waiting for the previous operation to complete.
Parameters
key
stringThe key to use.
calculationFunc
Func<T>A method to run in the background that returns a single value.
Returns
- IObservable<T>
A future value.
Type Parameters
T
The type of item to queue.
ShutdownQueue()
Flushes the remaining operations and returns a signal when they are all complete.
Returns
- IObservable<Unit>
An observable that signals when the queue has shutdown.