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
object
RedisDestination<TInput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.Redis
Assembly: ETLBox.Redis.dll
Syntax
public class RedisDestination<TInput> : DataFlowBatchDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowBatchDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowBatchDestination, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|
TInput | Type of ingoing data. |
Constructors
RedisDestination()
Declaration
public RedisDestination()
RedisDestination(int)
Declaration
public RedisDestination(int batchSize)
Parameters
Type | Name | Description |
---|
int | batchSize | |
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
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
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
RedisConnection
An existing ConnectionMultiplexer that holds a redis connection.
Declaration
public ConnectionMultiplexer RedisConnection { get; set; }
Property Value
Type | Description |
---|
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
Type | Description |
---|
System.Func<T, TResult><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
Type | Description |
---|
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
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
Overrides
Methods
BulkInsertData(TInput[])
Declaration
protected override void BulkInsertData(TInput[] data)
Parameters
Type | Name | Description |
---|
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