Table of Contents

Class KafkaDatabase

Namespace
MASES.EntityFrameworkCore.KNet.Storage.Internal
Assembly
MASES.EntityFrameworkCore.KNet.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public class KafkaDatabase : Database, IKafkaDatabase, IDatabase, IDisposable
Inheritance
KafkaDatabase
Implements
Inherited Members

Constructors

KafkaDatabase(DatabaseDependencies, IKafkaClusterCache, IDbContextOptions, IDesignTimeModel, IUpdateAdapterFactory, IDiagnosticsLogger<Update>)

Default initializer

public KafkaDatabase(DatabaseDependencies dependencies, IKafkaClusterCache clusterCache, IDbContextOptions options, IDesignTimeModel designTimeModel, IUpdateAdapterFactory updateAdapterFactory, IDiagnosticsLogger<DbLoggerCategory.Update> updateLogger)

Parameters

dependencies DatabaseDependencies
clusterCache IKafkaClusterCache
options IDbContextOptions
designTimeModel IDesignTimeModel
updateAdapterFactory IUpdateAdapterFactory
updateLogger IDiagnosticsLogger<DbLoggerCategory.Update>

Properties

Cluster

The referring IKafkaCluster

public virtual IKafkaCluster Cluster { get; }

Property Value

IKafkaCluster

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EnsureDatabaseConnected()

Execute the CanConnect()

public virtual bool EnsureDatabaseConnected()

Returns

bool

EnsureDatabaseCreated()

Execute the EnsureCreated()

public virtual bool EnsureDatabaseCreated()

Returns

bool

EnsureDatabaseDeleted()

Execute the EnsureDeleted()

public virtual bool EnsureDatabaseDeleted()

Returns

bool

SaveChanges(IList<IUpdateEntry>)

Persists changes from the supplied entries to the database.

public override int SaveChanges(IList<IUpdateEntry> entries)

Parameters

entries IList<IUpdateEntry>

Entries representing the changes to be persisted.

Returns

int

The number of state entries persisted to the database.

SaveChangesAsync(IList<IUpdateEntry>, CancellationToken)

Asynchronously persists changes from the supplied entries to the database.

public override Task<int> SaveChangesAsync(IList<IUpdateEntry> entries, CancellationToken cancellationToken = default)

Parameters

entries IList<IUpdateEntry>

Entries representing the changes to be persisted.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task<int>

A task that represents the asynchronous save operation. The task result contains the number of entries persisted to the database.

Exceptions

OperationCanceledException

If the CancellationToken is canceled.