RedisSource<TOutput>

Class RedisSource<TOutput>

A data flow source for Redis. Redis is a key/value store.
You can define a different scan pattern to describe which keys should be retrieved. (Default pattern is * which retrieves all key). By default, the stored values will be deserialized using Newtonsoft.Json and JsonConvert. This works only if your values contain json - for other values you can define your own serialization function.

Inherited Members
Namespace: ETLBox.Redis
Assembly: ETLBox.Redis.dll
Syntax
    public class RedisSource<TOutput> : DataFlowExecutableSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Constructors

RedisSource()

Declaration
    public RedisSource()

Properties

ConnectionString

If you provide a connection string, this component will create a new ConnectionMultiplexer object to connect with redis. If you already have a connection object instantiated in your application, use RedisConnection instead to pass it to the component.

Declaration
    public string ConnectionString { get; set; }
Property Value
TypeDescription
string

DatabaseNumber

Use the database number to store your data (redis databases are numbered from 0 to 15) The default database is 0.

Declaration
    public int DatabaseNumber { get; set; }
Property Value
TypeDescription
int

DeserializationFunc

Define your own deserialization function to read the stored data into your object.

Declaration
    public Func<string, TOutput> DeserializationFunc { get; set; }
Property Value
TypeDescription
Func<string, TOutput>

DeserializerSettings

The JsonSerializerSettings used to serialize or deserialize your object into json. By default, this component assumes your stored value is a json and tries to deserialize using JsonConvert. Use DeserializationFunc if you want to define your own deserialization function.

Declaration
    public JsonSerializerSettings DeserializerSettings { get; set; }
Property Value
TypeDescription
JsonSerializerSettings

RedisConnection

An existing ConnectionMultiplexer that holds a redis connection.

Declaration
    public ConnectionMultiplexer RedisConnection { get; set; }
Property Value
TypeDescription
ConnectionMultiplexer

ScanCountSize

This will modify the count size used for the scan. Default is 1000.

Declaration
    public int ScanCountSize { get; set; }
Property Value
TypeDescription
int

ScanPattern

The scan pattern that describes which keys should be retrieved. The default is , which retrieves all keys from a database. Use e.g. ke to retrieve all keys that start with "ke".

Declaration
    public string ScanPattern { get; set; }
Property Value
TypeDescription
string

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

OnExecutionDoAsyncWork()

Declaration
    protected override void OnExecutionDoAsyncWork()
Overrides

Implements