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
TKeyTValueKV
- Inheritance
-
KafkaStreamsRetriever<TKey, TValue, K, V>
- Implements
-
IKEFCoreStreamsRetriever<TKey>
- 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
producerIEntityTypeProducermetadataIValueContainerMetadatacomplexTypeConverterFactoryIComplexTypeConverterFactorykeySerdesISerDes<TKey, K>valueSerdesISerDes<TValue, V>
Methods
Create(IKEFCoreCluster, KEFCoreOptionsExtension)
Creates an instance of IStreamsManager
public static IStreamsManager Create(IKEFCoreCluster cluster, KEFCoreOptionsExtension options)
Parameters
clusterIKEFCoreClusteroptionsKEFCoreOptionsExtension
Returns
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
keyTKeyThe key to check for existence
Returns
GetValueBuffers(IKEFCoreDatabase)
Retrieve an IEnumerable<T> from the IKEFCoreStreamsRetriever<TKey> instance
public IEnumerable<ValueBuffer> GetValueBuffers(IKEFCoreDatabase database)
Parameters
databaseIKEFCoreDatabaseThe IKEFCoreDatabase requesting the data
Returns
GetValueBuffersByPrefix(IKEFCoreDatabase, IPrincipalKeyValueFactory<TKey>, object?[]?)
Retrieve the ValueBuffer using prefix scan
public IEnumerable<ValueBuffer> GetValueBuffersByPrefix(IKEFCoreDatabase database, IPrincipalKeyValueFactory<TKey> keyValueFactory, object?[]? prefixValues)
Parameters
databaseIKEFCoreDatabaseThe IKEFCoreDatabase requesting the data
keyValueFactoryIPrincipalKeyValueFactory<TKey>The key converter
prefixValuesobject[]The prefix
Returns
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
databaseIKEFCoreDatabaseThe IKEFCoreDatabase requesting the data
keyValueFactoryIPrincipalKeyValueFactory<TKey>The key converter
rangeStartobject[]The start key
rangeEndobject[]The end key
Returns
GetValueBuffersReverse(IKEFCoreDatabase)
Retrieve a reverse order IEnumerable<T> from the IKEFCoreStreamsRetriever<TKey> instance
public IEnumerable<ValueBuffer> GetValueBuffersReverse(IKEFCoreDatabase database)
Parameters
databaseIKEFCoreDatabaseThe IKEFCoreDatabase requesting the data
Returns
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
databaseIKEFCoreDatabaseThe IKEFCoreDatabase requesting the data
keyValueFactoryIPrincipalKeyValueFactory<TKey>The key converter
rangeStartobject[]The start key
rangeEndobject[]The end key
Returns
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
keyTKeyThe key to retrieve
propertiesIDictionary<string, object>A IDictionary<TKey, TValue> containing the property name and associated value, or null otherwise
complexPropertiesIDictionary<string, object>A IDictionary<TKey, TValue> containing the complex property name and associated value, or null otherwise
Returns
TryGetValue(TKey, out ValueBuffer)
Returns the values associated to the key
public bool TryGetValue(TKey key, out ValueBuffer valueBuffer)
Parameters
keyTKeyThe key to retrieve
valueBufferValueBufferA ValueBuffer containing the information, or null otherwise