Interface IReducerFactory
Assigns a unique Reducer for each provided key. Implementing IReducerFactory is optional.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public interface IReducerFactory
Create(Object)
Provides incoming element with a new instance of Reducer to merge intermediate key-value pairs from Combiner.
Declaration
IReducer Create(object key)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | Key for new Reducer |
Returns
Type | Description |
---|---|
IReducer | New instance of IReducer. |
Examples
Following example demostrates the implementation of Create.
public IReducer Create(object key)
{
WordCountReducer wcReducer = new WordCountReducer(); //new instance of Reducer.
return wcReducer;
}