Class StreamVisitor<TK, TV>
Convenience adapter to visit every key-value tuple in the stream. Note that the visitor does not update the cache.
Inheritance
System.Object
StreamVisitor<TK, TV>
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
[Serializable]
public sealed class StreamVisitor<TK, TV> : IStreamReceiver<TK, TV>
Type Parameters
Name | Description |
---|---|
TK | The type of the cache key. |
TV | The type of the cache value. |
Constructors
StreamVisitor(Action<ICache<TK, TV>, ICacheEntry<TK, TV>>)
Initializes a new instance of the StreamVisitor<TK, TV> class.
Declaration
public StreamVisitor(Action<ICache<TK, TV>, ICacheEntry<TK, TV>> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ICache<TK, TV>, ICacheEntry<TK, TV>> | action | The action to be called on each stream entry. |
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. |