C# Class FoundationDB.Layers.Messaging.FdbWorkerPool

Afficher le fichier Open project: BedeGaming/foundationdb-dotnet-client Class Usage Examples

Private Properties

Свойство Type Description
ClearTask void
FindRandomItem Slice>>.Task
GetRandomId Slice
PushQueueAsync Task
RunTask Task
StoreTask void

Méthodes publiques

Méthode Description
FdbWorkerPool ( FdbSubspace subspace ) : FoundationDB.Client
RunWorkerAsync ( IFdbDatabase db, Func handler, CancellationToken ct ) : Task

Run the worker loop

ScheduleTaskAsync ( IFdbRetryable db, Slice taskId, Slice taskBody, CancellationToken ct = default(CancellationToken) ) : Task

Add and Schedule a new Task in the worker pool

Private Methods

Méthode Description
ClearTask ( IFdbTransaction tr, Slice taskId ) : void
FindRandomItem ( IFdbTransaction tr, FdbSubspace ring ) : Slice>>.Task
GetRandomId ( ) : Slice
PushQueueAsync ( IFdbTransaction tr, FdbSubspace queue, Slice taskId ) : Task
RunTask ( IFdbDatabase db, FdbWorkerMessage msg, Func handler, CancellationToken ct ) : Task
StoreTask ( IFdbTransaction tr, Slice taskId, System.DateTime scheduledUtc, Slice taskBody ) : void

Method Details

FdbWorkerPool() public méthode

public FdbWorkerPool ( FdbSubspace subspace ) : FoundationDB.Client
subspace FdbSubspace
Résultat FoundationDB.Client

RunWorkerAsync() public méthode

Run the worker loop
public RunWorkerAsync ( IFdbDatabase db, Func handler, CancellationToken ct ) : Task
db IFdbDatabase
handler Func
ct System.Threading.CancellationToken
Résultat Task

ScheduleTaskAsync() public méthode

Add and Schedule a new Task in the worker pool
public ScheduleTaskAsync ( IFdbRetryable db, Slice taskId, Slice taskBody, CancellationToken ct = default(CancellationToken) ) : Task
db IFdbRetryable
taskId Slice
taskBody Slice
ct System.Threading.CancellationToken
Résultat Task