public final class SinkProcessors extends Object
package-level documentation.| Modifier and Type | Method and Description |
|---|---|
static <B,T> ProcessorSupplier |
writeBufferedP(DistributedIntFunction<B> newBufferFn,
DistributedBiConsumer<B,T> addToBufferFn,
DistributedConsumer<B> flushBufferFn)
Returns a supplier of processors for a vertex that drains all the items
from its inbox to an intermediate buffer and then flushes the buffer.
|
static <B,T> ProcessorSupplier |
writeBufferedP(DistributedIntFunction<B> newBufferFn,
DistributedBiConsumer<B,T> addToBufferFn,
DistributedConsumer<B> flushBufferFn,
DistributedConsumer<B> disposeBufferFn)
Returns a supplier of processors for a vertex that drains all the items
from the inbox to an intermediate buffer and then flushes the buffer.
|
static ProcessorMetaSupplier |
writeCacheP(String cacheName)
Returns a supplier of processors for
Sinks.cache(String). |
static ProcessorMetaSupplier |
writeFileP(String directoryName)
Returns a supplier of processors for
Sinks.files(String). |
static <T> ProcessorMetaSupplier |
writeFileP(String directoryName,
DistributedFunction<T,String> toStringFn)
Returns a supplier of processors for
Sinks.files(String, DistributedFunction). |
static <T> ProcessorMetaSupplier |
writeFileP(String directoryName,
DistributedFunction<T,String> toStringFn,
Charset charset,
boolean append)
Returns a supplier of processors for
Sinks.files(String, DistributedFunction, Charset, boolean). |
static ProcessorMetaSupplier |
writeListP(String listName)
Returns a supplier of processors for
Sinks.list(String). |
static ProcessorMetaSupplier |
writeMapP(String mapName)
Returns a supplier of processors for
Sinks.map(String). |
static ProcessorMetaSupplier |
writeRemoteCacheP(String cacheName,
com.hazelcast.client.config.ClientConfig clientConfig)
Returns a supplier of processors for
Sinks.remoteCache(String, ClientConfig). |
static ProcessorMetaSupplier |
writeRemoteListP(String listName,
com.hazelcast.client.config.ClientConfig clientConfig)
Returns a supplier of processors for
Sinks.remoteList(String, ClientConfig). |
static ProcessorMetaSupplier |
writeRemoteMapP(String mapName,
com.hazelcast.client.config.ClientConfig clientConfig)
Returns a supplier of processors for
Sinks.remoteMap(String, ClientConfig). |
static <T> ProcessorMetaSupplier |
writeSocketP(String host,
int port,
DistributedFunction<T,String> toStringFn,
Charset charset)
Returns a supplier of processors for
Sinks.socket(String, int). |
@Nonnull public static ProcessorMetaSupplier writeMapP(@Nonnull String mapName)
Sinks.map(String).@Nonnull public static ProcessorMetaSupplier writeRemoteMapP(@Nonnull String mapName, @Nonnull com.hazelcast.client.config.ClientConfig clientConfig)
Sinks.remoteMap(String, ClientConfig).@Nonnull public static ProcessorMetaSupplier writeCacheP(@Nonnull String cacheName)
Sinks.cache(String).@Nonnull public static ProcessorMetaSupplier writeRemoteCacheP(@Nonnull String cacheName, @Nonnull com.hazelcast.client.config.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 com.hazelcast.client.config.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> ProcessorSupplier writeBufferedP(@Nonnull DistributedIntFunction<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 global processor index.addToBufferFn - adds an item to the bufferflushBufferFn - flushes the buffer@Nonnull public static <B,T> ProcessorSupplier writeBufferedP(@Nonnull DistributedIntFunction<B> newBufferFn, @Nonnull DistributedBiConsumer<B,T> addToBufferFn, @Nonnull DistributedConsumer<B> flushBufferFn, @Nonnull DistributedConsumer<B> disposeBufferFn)
disposeBufferFn.
This is a useful building block to implement sinks with explicit control over buffering and flushing.
B - type of bufferT - type of received itemnewBufferFn - supplies the buffer. The argument to this function
is the global processor index.addToBufferFn - adds item to bufferflushBufferFn - flushes the bufferdisposeBufferFn - disposes of the bufferCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.