public final class SinkProcessors extends Object
package-level documentation.@Nonnull public static ProcessorMetaSupplier writeMapP(@Nonnull String mapName)
Sinks.map(String).@Nonnull public static ProcessorMetaSupplier writeRemoteMapP(@Nonnull String mapName, @Nonnull ClientConfig clientConfig)
Sinks.remoteMap(String, ClientConfig).@Nonnull public static <E,K,V> ProcessorMetaSupplier mergeMapP(@Nonnull String mapName, @Nonnull DistributedFunction<E,K> toKeyFn, @Nonnull DistributedFunction<E,V> toValueFn, @Nonnull DistributedBinaryOperator<V> mergeFn)
Sinks.mapWithMerging(String, DistributedFunction, DistributedFunction,
DistributedBinaryOperator).@Nonnull public static <E,K,V> ProcessorMetaSupplier mergeRemoteMapP(@Nonnull String mapName, @Nonnull ClientConfig clientConfig, @Nonnull DistributedFunction<E,K> toKeyFn, @Nonnull DistributedFunction<E,V> toValueFn, @Nonnull DistributedBinaryOperator<V> mergeFn)
Sinks.remoteMapWithMerging(String, ClientConfig, DistributedFunction,
DistributedFunction, DistributedBinaryOperator).@Nonnull public static <E,K,V> ProcessorMetaSupplier updateMapP(@Nonnull String mapName, @Nonnull DistributedFunction<E,K> toKeyFn, @Nonnull DistributedBiFunction<V,E,V> updateFn)
Sinks.mapWithEntryProcessor(String, DistributedFunction, DistributedFunction) .@Nonnull public static <E,K,V> ProcessorMetaSupplier updateRemoteMapP(@Nonnull String mapName, @Nonnull ClientConfig clientConfig, @Nonnull DistributedFunction<E,K> toKeyFn, @Nonnull DistributedBiFunction<V,E,V> updateFn)
Sinks.remoteMapWithUpdating(String, ClientConfig, DistributedFunction
, DistributedBiFunction).@Nonnull public static <T,K,V> ProcessorMetaSupplier updateMapP(@Nonnull String mapName, @Nonnull DistributedFunction<T,K> toKeyFn, @Nonnull DistributedFunction<T,EntryProcessor<K,V>> toEntryProcessorFn)
Sinks.mapWithEntryProcessor(String, DistributedFunction, DistributedFunction).@Nonnull public static <T,K,V> ProcessorMetaSupplier updateRemoteMapP(@Nonnull String mapName, @Nonnull ClientConfig clientConfig, @Nonnull DistributedFunction<T,K> toKeyFn, @Nonnull DistributedFunction<T,EntryProcessor<K,V>> toEntryProcessorFn)
Sinks.remoteMapWithEntryProcessor(String, ClientConfig, DistributedFunction,
DistributedFunction).@Nonnull public static ProcessorMetaSupplier writeCacheP(@Nonnull String cacheName)
Sinks.cache(String).@Nonnull public static ProcessorMetaSupplier writeRemoteCacheP(@Nonnull String cacheName, @Nonnull ClientConfig clientConfig)
Sinks.remoteCache(String, ClientConfig).@Nonnull public static ProcessorMetaSupplier writeListP(@Nonnull String listName)
Sinks.list(String).@Nonnull public static ProcessorMetaSupplier writeRemoteListP(@Nonnull String listName, @Nonnull ClientConfig clientConfig)
Sinks.remoteList(String, ClientConfig).public static <T> ProcessorMetaSupplier writeSocketP(@Nonnull String host, int port, @Nonnull DistributedFunction<T,String> toStringFn, @Nonnull Charset charset)
Sinks.socket(String, int).@Nonnull public static <T> ProcessorMetaSupplier writeFileP(@Nonnull String directoryName, @Nonnull DistributedFunction<T,String> toStringFn, @Nonnull Charset charset, boolean append)
Sinks.files(String, DistributedFunction, Charset, boolean).@Nonnull public static <T> ProcessorMetaSupplier writeFileP(@Nonnull String directoryName, @Nonnull DistributedFunction<T,String> toStringFn)
Sinks.files(String, DistributedFunction).@Nonnull public static ProcessorMetaSupplier writeFileP(@Nonnull String directoryName)
Sinks.files(String).@Nonnull public static <B,T> DistributedSupplier<Processor> writeBufferedP(@Nonnull DistributedFunction<Processor.Context,B> newBufferFn, @Nonnull DistributedBiConsumer<B,T> addToBufferFn, @Nonnull DistributedConsumer<B> flushBufferFn)
B - type of bufferT - type of received itemnewBufferFn - supplies the buffer. The argument to this function
is the context for the given processor.addToBufferFn - adds an item to the bufferflushBufferFn - flushes the buffer@Nonnull public static <W,T> DistributedSupplier<Processor> writeBufferedP(@Nonnull DistributedFunction<? super Processor.Context,? extends W> createFn, @Nonnull DistributedBiConsumer<? super W,? super T> onReceiveFn, @Nonnull DistributedConsumer<? super W> flushFn, @Nonnull DistributedConsumer<? super W> destroyFn)
destroyFn.
This is a useful building block to implement sinks with explicit control over resource management, buffering and flushing.
W - type of the writerT - type of the received itemcreateFn - supplies the buffer. The argument to this function
is the context for the given processor.onReceiveFn - function that Jet calls upon receiving each item for the sinkflushFn - function that flushes the writerdestroyFn - function that destroys the writerCopyright © 2018 Hazelcast, Inc.. All rights reserved.