Class RedisDestination<TInput>

A data flow destination for Redis. Regis is a key/value store. You can define a key column using either a KeyColumnAttribute on your object or assign a value to the KeyColumn property. If no key column is provided, a Guid is created and used as key. The stored value will contain your serialized object using Newtonsoft.Json and JsonConvert.

Inherited Members
Namespace: ETLBox.Redis
Assembly: ETLBox.Redis.dll
Syntax
    public class RedisDestination<TInput> : DataFlowBatchDestination<TInput>, IDataFlowLogging, IDataFlowBatchDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowBatchDestination, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TInput

Type of ingoing data.

Constructors

RedisDestination()

Declaration
    public RedisDestination()

RedisDestination(int)

Declaration
    public RedisDestination(int batchSize)
Parameters
TypeNameDescription
intbatchSize

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

KeyColumn

Define the property in your dynamic or strongly type object that is used for retrieving the key value. The property must be either of type string or implement the ToString() method. Only one property can be used as key. You can also use the KeyColumn attribute instead.

Declaration
    public KeyColumn KeyColumn { get; set; }
Property Value
TypeDescription
KeyColumn

RedisConnection

An existing ConnectionMultiplexer that holds a redis connection.

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

SerializationFunc

By default, your object is serialzed into json. Define your own serialization function here.

Declaration
    public Func<TInput, string> SerializationFunc { get; set; }
Property Value
TypeDescription
Func<TInput, string>

SerializerSettings

The JsonSerializerSettings used to serialize or deserialize your object into json. By default, your object is serialized into json. Use SerializationFunc if you want to define your own serialization function.

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

SetParameter

Provide additional redis parameter that are used when setting the key/value pairs in redis.

Declaration
    public RedisDestination<TInput>.RedisSetParameter SetParameter { get; set; }
Property Value
TypeDescription
RedisDestination<TInput>.RedisSetParameter

Methods

BulkInsertData(TInput[])

Declaration
    protected override void BulkInsertData(TInput[] data)
Parameters
TypeNameDescription
TInput[]data
Overrides

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

FinishWrite()

Declaration
    protected override void FinishWrite()
Overrides

InitCheckedParameter()

Declaration
    protected override void InitCheckedParameter()
Overrides

PrepareParameterForCheck()

Declaration
    protected override void PrepareParameterForCheck()
Overrides

PrepareWrite()

Declaration
    protected override void PrepareWrite()
Overrides

Implements