C# Class FoundationDB.Samples.Tutorials.ClassScheduling

Inheritance: IAsyncTest
Exibir arquivo Open project: BedeGaming/foundationdb-dotnet-client

Public Methods

Method Description
AvailableClasses ( IFdbReadOnlyTransaction tr ) : Task>

Returns the list of names of all existing classes

ClassScheduling ( ) : FoundationDB.Client
Drop ( IFdbTransaction tr, string s, string c ) : Task

Drop a student from a class

IndecisiveStudent ( IFdbDatabase db, int id, int ops, CancellationToken ct ) : Task

Simulate a student that is really indecisive

Init ( IFdbDatabase db, CancellationToken ct ) : Task

Setup the initial state of the database

Run ( IFdbDatabase db, TextWriter log, CancellationToken ct ) : Task
Signup ( IFdbTransaction tr, string s, string c ) : Task

Signup a student to a class

Switch ( IFdbTransaction tr, string s, string oldC, string newC ) : Task

Drop a student from a class, and sign him up to another class

Protected Methods

Method Description
AttendsKey ( string s, string c ) : Slice
AttendsKeys ( string s ) : FdbKeyRange
ClassKey ( string c ) : Slice

Method Details

AttendsKey() protected method

protected AttendsKey ( string s, string c ) : Slice
s string
c string
return Slice

AttendsKeys() protected method

protected AttendsKeys ( string s ) : FdbKeyRange
s string
return FdbKeyRange

AvailableClasses() public method

Returns the list of names of all existing classes
public AvailableClasses ( IFdbReadOnlyTransaction tr ) : Task>
tr IFdbReadOnlyTransaction
return Task>

ClassKey() protected method

protected ClassKey ( string c ) : Slice
c string
return Slice

ClassScheduling() public method

public ClassScheduling ( ) : FoundationDB.Client
return FoundationDB.Client

Drop() public method

Drop a student from a class
public Drop ( IFdbTransaction tr, string s, string c ) : Task
tr IFdbTransaction
s string
c string
return Task

IndecisiveStudent() public method

Simulate a student that is really indecisive
public IndecisiveStudent ( IFdbDatabase db, int id, int ops, CancellationToken ct ) : Task
db IFdbDatabase
id int
ops int
ct System.Threading.CancellationToken
return Task

Init() public method

Setup the initial state of the database
public Init ( IFdbDatabase db, CancellationToken ct ) : Task
db IFdbDatabase
ct System.Threading.CancellationToken
return Task

Run() public method

public Run ( IFdbDatabase db, TextWriter log, CancellationToken ct ) : Task
db IFdbDatabase
log System.IO.TextWriter
ct System.Threading.CancellationToken
return Task

Signup() public method

Signup a student to a class
public Signup ( IFdbTransaction tr, string s, string c ) : Task
tr IFdbTransaction
s string
c string
return Task

Switch() public method

Drop a student from a class, and sign him up to another class
public Switch ( IFdbTransaction tr, string s, string oldC, string newC ) : Task
tr IFdbTransaction
s string
oldC string
newC string
return Task