public final class Hz3Sinks extends Object
Modifier and Type | Method and Description |
---|---|
static <T,K,V> Sink<T> |
map(String mapName,
FunctionEx<? super T,? extends K> toKeyFn,
FunctionEx<? super T,? extends V> toValueFn,
String clientXml)
Returns a sink that uses the supplied functions to extract the key
and value with which to put to a Hazelcast
IMap with the
specified name. |
static <K,V> Sink<Map.Entry<K,V>> |
map(String mapName,
String clientXml)
Returns a sink that puts
Map.Entry s it receives into a Hazelcast
IMap with the specified name. |
@Nonnull public static <K,V> Sink<Map.Entry<K,V>> map(@Nonnull String mapName, @Nonnull String clientXml)
Map.Entry
s it receives into a Hazelcast
IMap
with the specified name.
This sink provides the exactly-once guarantee thanks to idempotent updates. It means that the value with the same key is not appended, but overwritten. After the job is restarted from snapshot, duplicate items will not change the state in the target map.
The default local parallelism for this sink is 1.
@Nonnull public static <T,K,V> Sink<T> map(@Nonnull String mapName, @Nonnull FunctionEx<? super T,? extends K> toKeyFn, @Nonnull FunctionEx<? super T,? extends V> toValueFn, @Nonnull String clientXml)
IMap
with the
specified name.
This sink provides the exactly-once guarantee thanks to idempotent updates. It means that the value with the same key is not appended, but overwritten. After the job is restarted from snapshot, duplicate items will not change the state in the target map.
The default local parallelism for this sink is 1.
The given functions must be stateless and cooperative.
Copyright © 2021 Hazelcast, Inc.. All rights reserved.