Show / Hide Table of Contents

# Class StreamTransformer<TK, TV, TArg, TRes>

Convenience adapter to transform update existing values in streaming cache based on the previously cached value.

##### Inheritance

System.Object
StreamTransformer<TK, TV, TArg, TRes>

##### Implements

IStreamReceiver<TK, TV>

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Apache.Ignite.Core.Datastream

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public sealed class StreamTransformer<TK, TV, TArg, TRes> : IStreamReceiver<TK, TV>, IBinaryWriteAware

##### Type Parameters

Name | Description
--- | ---
TK | Key type.
TV | Value type.
TArg | The type of the processor argument.
TRes | The type of the processor result.

### Constructors

#### StreamTransformer(ICacheEntryProcessor<TK, TV, TArg, TRes>)

Initializes a new instance of the StreamTransformer<TK, TV, TArg, TRes> class.

##### Declaration

    public StreamTransformer(ICacheEntryProcessor<TK, TV, TArg, TRes> proc)

##### Parameters

Type | Name | Description
--- | --- | ---
ICacheEntryProcessor<TK, TV, TArg, TRes> | proc | Entry processor.

### Methods

#### Receive(ICache<TK, TV>, ICollection<ICacheEntry<TK, TV>>)

Updates cache with batch of entries.

##### Declaration

    public void Receive(ICache<TK, TV> cache, ICollection<ICacheEntry<TK, TV>> entries)

##### Parameters

Type | Name | Description
--- | --- | ---
ICache<TK, TV> | cache | Cache.
System.Collections.Generic.ICollection<ICacheEntry<TK, TV>> | entries | Entries.

### Implements

IStreamReceiver<TK, TV>