C# Class FoundationDB.Storage.Memory.API.MemoryDatabase

In-memory database instance
Inheritance: FdbDatabase
Mostra file Open project: BedeGaming/foundationdb-dotnet-client

Public Methods

Method Description
BulkLoadAsync ( Slice>.IEnumerable data, bool ordered = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Replace the content of the database with existing data.

Any pre-existing data will be removed!

Collect ( ) : void

Trigger a garbage collection of the memory database

If the amount of memory that can be collected is too small, this operation will do nothing.

CreateNew ( ) : MemoryDatabase
CreateNew ( string name ) : MemoryDatabase
CreateNew ( string name, FdbSubspace globalSpace, bool readOnly ) : MemoryDatabase
LoadFromAsync ( string path, CancellationToken cancellationToken ) : Task
SaveSnapshotAsync ( string path, FoundationDB.Storage.Memory.API.MemorySnapshotOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Private Methods

Method Description
Debug_Dump ( bool detailed = false ) : void
MemoryDatabase ( IFdbCluster cluster, MemoryDatabaseHandler handler, string name, FdbSubspace globalSpace, IFdbDirectory directory, bool readOnly, bool ownsCluster ) : FoundationDB.Client

Method Details

BulkLoadAsync() public method

Replace the content of the database with existing data.
Any pre-existing data will be removed!
public BulkLoadAsync ( Slice>.IEnumerable data, bool ordered = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
data Slice>.IEnumerable Data that will replace the content of the database. The elements do not need to be sorted, but best performance is achieved if all the keys are lexicographically ordered (smallest to largest)
ordered bool
cancellationToken System.Threading.CancellationToken Optionnal cancellation token
return Task

Collect() public method

Trigger a garbage collection of the memory database
If the amount of memory that can be collected is too small, this operation will do nothing.
public Collect ( ) : void
return void

CreateNew() public static method

public static CreateNew ( ) : MemoryDatabase
return MemoryDatabase

CreateNew() public static method

public static CreateNew ( string name ) : MemoryDatabase
name string
return MemoryDatabase

CreateNew() public static method

public static CreateNew ( string name, FdbSubspace globalSpace, bool readOnly ) : MemoryDatabase
name string
globalSpace FdbSubspace
readOnly bool
return MemoryDatabase

LoadFromAsync() public static method

public static LoadFromAsync ( string path, CancellationToken cancellationToken ) : Task
path string
cancellationToken System.Threading.CancellationToken
return Task

SaveSnapshotAsync() public method

public SaveSnapshotAsync ( string path, FoundationDB.Storage.Memory.API.MemorySnapshotOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
path string
options FoundationDB.Storage.Memory.API.MemorySnapshotOptions
cancellationToken System.Threading.CancellationToken
return Task