2 using System.Collections.Generic;
9 public System.Uri
url {
get;
private set; }
10 private readonly
int capacity;
11 private List<T> queue;
35 public WorkerQueue(System.Uri
url,
int capacity,
bool hasPrimaryKey,
bool updateOnExistingPk)
38 this.capacity = capacity;
54 IList<T> old_queue = this.queue;
55 queue =
new List<T>(this.capacity);
73 if (queue.Count == capacity)
IList< T >? insert(T record, RecordKey key)
Inserts a record into the queue (if all conditions are favourable).
IList< T > flush()
Returns the current queue and creates a new empty one.
WorkerQueue(System.Uri url)
Creates an insertion queue for a given worker.
A binary key used for shard routing.
WorkerQueue(System.Uri url, int capacity, bool hasPrimaryKey, bool updateOnExistingPk)
Creates an insertion queue for a given worker.