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.

Inheritance
System.Object
RedisDestination<TInput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Connectors
Assembly: ETLBox.Redis.dll
Syntax
    public class RedisDestination<TInput> : DataFlowBatchDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowBatchDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, IDataFlowBatchDestination
Type Parameters
NameDescription
TInput

Type of ingoing data.

Constructors

RedisDestination()

Declaration
    public RedisDestination()

RedisDestination(Int32)

Declaration
    public RedisDestination(int batchSize)
Parameters
TypeNameDescription
System.Int32batchSize

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
System.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
System.Int32

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
StackExchange.Redis.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
System.Func<TInput, System.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
Newtonsoft.Json.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.RedisSetParameter<>

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
System.String
Overrides

Methods

BulkInsertData(TInput[])

Declaration
    protected override void BulkInsertData(TInput[] data)
Parameters
TypeNameDescription
TInput[]data
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.BulkInsertData(TInput[])

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

FinishWrite()

Declaration
    protected override void FinishWrite()
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.FinishWrite()

InitParameter()

Declaration
    protected override void InitParameter()
Overrides

PrepareParameter()

Declaration
    protected override void PrepareParameter()
Overrides

PrepareWrite()

Declaration
    protected override void PrepareWrite()
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.PrepareWrite()

Implements