Table of Contents

Class KafkaStreamsRetriever<TKey, TValue, K, V>

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 KafkaStreamsRetriever<TKey, TValue, K, V> : IKEFCoreStreamsRetriever<TKey>, IDisposable where TKey : notnull where TValue : IValueContainer<TKey>

Type Parameters

TKey
TValue
K
V
Inheritance
KafkaStreamsRetriever<TKey, TValue, K, V>
Implements
Inherited Members

Constructors

KafkaStreamsRetriever(IEntityTypeProducer, IValueContainerMetadata, IComplexTypeConverterFactory, ISerDes<TKey, K>, ISerDes<TValue, V>)

Default initializer

public KafkaStreamsRetriever(IEntityTypeProducer producer, IValueContainerMetadata metadata, IComplexTypeConverterFactory complexTypeConverterFactory, ISerDes<TKey, K> keySerdes, ISerDes<TValue, V> valueSerdes)

Parameters

producer IEntityTypeProducer
metadata IValueContainerMetadata
complexTypeConverterFactory IComplexTypeConverterFactory
keySerdes ISerDes<TKey, K>
valueSerdes ISerDes<TValue, V>

Methods

Create(IKEFCoreCluster, KEFCoreOptionsExtension)

Creates an instance of IStreamsManager

public static IStreamsManager Create(IKEFCoreCluster cluster, KEFCoreOptionsExtension options)

Parameters

cluster IKEFCoreCluster
options KEFCoreOptionsExtension

Returns

IStreamsManager

Dispose()

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

public void Dispose()

Exist(TKey)

Check if a key exist

public bool Exist(TKey key)

Parameters

key TKey

The key to check for existence

Returns

bool

true if the key exist, false otherwise

GetValueBuffers(IKEFCoreDatabase)

Retrieve an IEnumerable<T> from the IKEFCoreStreamsRetriever<TKey> instance

public IEnumerable<ValueBuffer> GetValueBuffers(IKEFCoreDatabase database)

Parameters

database IKEFCoreDatabase

The IKEFCoreDatabase requesting the data

Returns

IEnumerable<ValueBuffer>

An IEnumerable<T>

GetValueBuffersByPrefix(IKEFCoreDatabase, IPrincipalKeyValueFactory<TKey>, object?[]?)

Retrieve the ValueBuffer using prefix scan

public IEnumerable<ValueBuffer> GetValueBuffersByPrefix(IKEFCoreDatabase database, IPrincipalKeyValueFactory<TKey> keyValueFactory, object?[]? prefixValues)

Parameters

database IKEFCoreDatabase

The IKEFCoreDatabase requesting the data

keyValueFactory IPrincipalKeyValueFactory<TKey>

The key converter

prefixValues object[]

The prefix

Returns

IEnumerable<ValueBuffer>

An IEnumerable<T> of ValueBuffer

GetValueBuffersRange(IKEFCoreDatabase, IPrincipalKeyValueFactory<TKey>, object?[]?, object?[]?)

Retrieve an IEnumerable<T> in the range rangeStart/rangeEnd from the IKEFCoreStreamsRetriever<TKey> instance

public IEnumerable<ValueBuffer> GetValueBuffersRange(IKEFCoreDatabase database, IPrincipalKeyValueFactory<TKey> keyValueFactory, object?[]? rangeStart, object?[]? rangeEnd)

Parameters

database IKEFCoreDatabase

The IKEFCoreDatabase requesting the data

keyValueFactory IPrincipalKeyValueFactory<TKey>

The key converter

rangeStart object[]

The start key

rangeEnd object[]

The end key

Returns

IEnumerable<ValueBuffer>

An IEnumerable<T>

GetValueBuffersReverse(IKEFCoreDatabase)

Retrieve a reverse order IEnumerable<T> from the IKEFCoreStreamsRetriever<TKey> instance

public IEnumerable<ValueBuffer> GetValueBuffersReverse(IKEFCoreDatabase database)

Parameters

database IKEFCoreDatabase

The IKEFCoreDatabase requesting the data

Returns

IEnumerable<ValueBuffer>

An IEnumerable<T>

GetValueBuffersReverseRange(IKEFCoreDatabase, IPrincipalKeyValueFactory<TKey>, object?[]?, object?[]?)

Retrieve an IEnumerable<T> in the reverse range rangeStart/rangeEnd from the IKEFCoreStreamsRetriever<TKey> instance

public IEnumerable<ValueBuffer> GetValueBuffersReverseRange(IKEFCoreDatabase database, IPrincipalKeyValueFactory<TKey> keyValueFactory, object?[]? rangeStart, object?[]? rangeEnd)

Parameters

database IKEFCoreDatabase

The IKEFCoreDatabase requesting the data

keyValueFactory IPrincipalKeyValueFactory<TKey>

The key converter

rangeStart object[]

The start key

rangeEnd object[]

The end key

Returns

IEnumerable<ValueBuffer>

An IEnumerable<T>

TryGetProperties(TKey, out IDictionary<string, object?>, out IDictionary<string, object?>)

Returns the values associated to the key

public bool TryGetProperties(TKey key, out IDictionary<string, object?> properties, out IDictionary<string, object?> complexProperties)

Parameters

key TKey

The key to retrieve

properties IDictionary<string, object>

A IDictionary<TKey, TValue> containing the property name and associated value, or null otherwise

complexProperties IDictionary<string, object>

A IDictionary<TKey, TValue> containing the complex property name and associated value, or null otherwise

Returns

bool

true if the key exist, false otherwise

TryGetValue(TKey, out ValueBuffer)

Returns the values associated to the key

public bool TryGetValue(TKey key, out ValueBuffer valueBuffer)

Parameters

key TKey

The key to retrieve

valueBuffer ValueBuffer

A ValueBuffer containing the information, or null otherwise

Returns

bool

true if the key exist, false otherwise