## Uses of Interface
com.hazelcast.jet.pipeline.Sink

- Packages that use Sink
  Package | Description
  --- | ---
  com.hazelcast.jet.avro | Apache Avro file read/write support for Hazelcast Jet.
  com.hazelcast.jet.hadoop | Apache Hadoop HDFS read/write support for Hazelcast Jet.
  com.hazelcast.jet.kafka | Apache Kafka reader/writer support for Hazelcast Jet.
  com.hazelcast.jet.pipeline | The Pipeline API is Jet's high-level API to build and execute distributed computation jobs.

- - ### Uses of Sink in com.hazelcast.jet.avro

    Methods in com.hazelcast.jet.avro that return Sink
    Modifier and Type | Method and Description
    --- | ---
    `static Sink<org.apache.avro.generic.IndexedRecord>` | AvroSinks.`files(String directoryName, DistributedSupplier<org.apache.avro.Schema> schemaSupplier)` Convenience for `AvroSinks.files(String, DistributedSupplier, DistributedSupplier)` which uses `GenericDatumWriter`.
    `static <R> Sink<R>` | AvroSinks.`files(String directoryName, DistributedSupplier<org.apache.avro.Schema> schemaSupplier, Class<R> recordClass)` Convenience for `AvroSinks.files(String, DistributedSupplier, DistributedSupplier)` which uses either `SpecificDatumWriter` or `ReflectDatumWriter` depending on the supplied `recordClass`.
    `static <R> Sink<R>` | AvroSinks.`files(String directoryName, DistributedSupplier<org.apache.avro.Schema> schemaSupplier, DistributedSupplier<org.apache.avro.io.DatumWriter<R>> datumWriterSupplier)` Returns a sink that that writes the items it receives to Apache Avro files.

  - ### Uses of Sink in com.hazelcast.jet.hadoop

    Methods in com.hazelcast.jet.hadoop that return Sink
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> Sink<Map.Entry<K,V>>` | HdfsSinks.`hdfs(org.apache.hadoop.mapred.JobConf jobConf)` Convenience for `HdfsSinks.hdfs(JobConf, DistributedFunction, DistributedFunction)` which expects `Map.Entry<K, V>` as input and extracts its key and value parts to be written to HDFS.
    `static <E,K,V> Sink<E>` | HdfsSinks.`hdfs(org.apache.hadoop.mapred.JobConf jobConf, DistributedFunction<? super E,K> extractKeyF, DistributedFunction<? super E,V> extractValueF)` Returns a sink that writes to Apache Hadoop HDFS.

  - ### Uses of Sink in com.hazelcast.jet.kafka

    Methods in com.hazelcast.jet.kafka that return Sink
    Modifier and Type | Method and Description
    --- | ---
    `static <E,K,V> Sink<E>` | KafkaSinks.`kafka(Properties properties, DistributedFunction<? super E,org.apache.kafka.clients.producer.ProducerRecord<K,V>> toRecordFn)` Returns a source that publishes messages to an Apache Kafka topic.
    `static <K,V> Sink<Map.Entry<K,V>>` | KafkaSinks.`kafka(Properties properties, String topic)` Convenience for `KafkaSinks.kafka(Properties, String, DistributedFunction, DistributedFunction)` which expects `Map.Entry<K, V>` as input and extracts its key and value parts to be published to Kafka.
    `static <E,K,V> Sink<E>` | KafkaSinks.`kafka(Properties properties, String topic, DistributedFunction<? super E,K> extractKeyFn, DistributedFunction<? super E,V> extractValueFn)` Convenience for `KafkaSinks.kafka(Properties, DistributedFunction)` which creates a `ProducerRecord` using the given topic and the given key and value mapping functions

  - ### Uses of Sink in com.hazelcast.jet.pipeline

    Methods in com.hazelcast.jet.pipeline that return Sink
    Modifier and Type | Method and Description
    --- | ---
    `Sink<T>` | SinkBuilder.`build()` Creates and returns the `Sink` with the components you supplied to this builder.
    `Sink<T>` | JmsSinkBuilder.`build()` Creates and returns the JMS `Sink` with the supplied components.
    `Sink<T>` | FileSinkBuilder.`build()` Creates and returns the file `Sink` with the supplied components.
    `static <T extends Map.Entry> Sink<T>` | Sinks.`cache(String cacheName)` Returns a sink that puts `Map.Entry`s it receives into a Hazelcast `ICache` with the specified name.
    `static <T> Sink<T>` | Sinks.`files(String directoryName)` Convenience for `Sinks.filesBuilder(java.lang.String)` with the UTF-8 charset and with overwriting of existing files.
    `static <T> Sink<T>` | Sinks.`fromProcessor(String sinkName, ProcessorMetaSupplier metaSupplier)` Returns a sink constructed directly from the given Core API processor meta-supplier.
    `static <T> Sink<T>` | Sinks.`jdbc(String updateQuery, DistributedSupplier<Connection> connectionSupplier, DistributedBiConsumer<PreparedStatement,T> bindFn)` Returns a sink that connects to the specified database using the given `connectionSupplier`, prepares a statement using the given `updateQuery` and inserts/updates the items.
    `static <T> Sink<T>` | Sinks.`jdbc(String updateQuery, String connectionUrl, DistributedBiConsumer<PreparedStatement,T> bindFn)` Convenience for `Sinks.jdbc(String, DistributedSupplier, DistributedBiConsumer)`.
    `static <T> Sink<T>` | Sinks.`jmsQueue(DistributedSupplier<javax.jms.ConnectionFactory> factorySupplier, String name)` Convenience for `Sinks.jmsQueueBuilder(DistributedSupplier)`.
    `static <T> Sink<T>` | Sinks.`jmsTopic(DistributedSupplier<javax.jms.ConnectionFactory> factorySupplier, String name)` Convenience for `Sinks.jmsTopicBuilder(DistributedSupplier)`.
    `static <T> Sink<T>` | Sinks.`list(IList<? super T> list)` Returns a sink that adds the items it receives to a Hazelcast `IList` with the specified name.
    `static <T> Sink<T>` | Sinks.`list(String listName)` Returns a sink that adds the items it receives to a Hazelcast `IList` with the specified name.
    `static <T> Sink<T>` | Sinks.`logger()` Convenience for `Sinks.logger(DistributedFunction)` with `Object.toString()` as the `toStringFn`.
    `static <T> Sink<T>` | Sinks.`logger(DistributedFunction<? super T,String> toStringFn)` Returns a sink that logs all the data items it receives, at the INFO level to the log category `WriteLoggerP`.
    `static <K,V> Sink<Map.Entry<K,V>>` | Sinks.`map(IMap<? super K,? super V> map)` Returns a sink that puts `Map.Entry`s it receives into the given Hazelcast `IMap`.
    `static <K,V> Sink<Map.Entry<K,V>>` | Sinks.`map(String mapName)` Returns a sink that puts `Map.Entry`s it receives into a Hazelcast `IMap` with the specified name.
    `static <T,K,V> Sink<T>` | Sinks.`mapWithEntryProcessor(IMap<? super K,? super V> map, DistributedFunction<? super T,? extends K> toKeyFn, DistributedFunction<? super T,? extends EntryProcessor<K,V>> toEntryProcessorFn)` Returns a sink that uses the items it receives to create `EntryProcessor`s it submits to a Hazelcast `IMap` with the specified name.
    `static <E,K,V> Sink<E>` | Sinks.`mapWithEntryProcessor(String mapName, DistributedFunction<? super E,? extends K> toKeyFn, DistributedFunction<? super E,? extends EntryProcessor<K,V>> toEntryProcessorFn)` Returns a sink that uses the items it receives to create `EntryProcessor`s it submits to a Hazelcast `IMap` with the specified name.
    `static <T,K,V> Sink<T>` | Sinks.`mapWithMerging(IMap<? super K,? super V> map, DistributedFunction<? super T,? extends K> toKeyFn, DistributedFunction<? super T,? extends V> toValueFn, DistributedBinaryOperator<V> mergeFn)` Returns a sink that uses the supplied functions to extract the key and value with which to update a Hazelcast `IMap`.
    `static <K,V,V_IN extends V> Sink<Map.Entry<K,V_IN>>` | Sinks.`mapWithMerging(IMap<? super K,V> map, DistributedBinaryOperator<V> mergeFn)` Convenience for `Sinks.mapWithMerging(IMap, DistributedFunction, DistributedFunction, DistributedBinaryOperator)` with `Map.Entry` as input item.
    `static <K,V> Sink<Map.Entry<K,V>>` | Sinks.`mapWithMerging(String mapName, DistributedBinaryOperator<? super V> mergeFn)` Convenience for `Sinks.mapWithMerging(String, DistributedFunction, DistributedFunction, DistributedBinaryOperator)` with `Map.Entry` as input item.
    `static <T,K,V> Sink<T>` | Sinks.`mapWithMerging(String mapName, DistributedFunction<? super T,? extends K> toKeyFn, DistributedFunction<? super T,? extends V> toValueFn, DistributedBinaryOperator<V> mergeFn)` Returns a sink that uses the supplied functions to extract the key and value with which to update a Hazelcast `IMap`.
    `static <K,V,E extends Map.Entry<K,V>> Sink<E>` | Sinks.`mapWithUpdating(IMap<? super K,? super V> map, DistributedBiFunction<? super V,? super E,? extends V> updateFn)` Convenience for `Sinks.mapWithUpdating(IMap, DistributedFunction, DistributedBiFunction)` with `Map.Entry` as the input item.
    `static <T,K,V> Sink<T>` | Sinks.`mapWithUpdating(IMap<? super K,? super V> map, DistributedFunction<? super T,? extends K> toKeyFn, DistributedBiFunction<? super V,? super T,? extends V> updateFn)` Returns a sink that uses the supplied key-extracting and value-updating functions to update a Hazelcast `IMap`.
    `static <K,V,E extends Map.Entry<K,V>> Sink<E>` | Sinks.`mapWithUpdating(String mapName, DistributedBiFunction<? super V,? super E,? extends V> updateFn)` Convenience for `Sinks.mapWithUpdating(String, DistributedFunction, DistributedBiFunction)` with `Map.Entry` as the input item.
    `static <T,K,V> Sink<T>` | Sinks.`mapWithUpdating(String mapName, DistributedFunction<? super T,? extends K> toKeyFn, DistributedBiFunction<? super V,? super T,? extends V> updateFn)` Returns a sink that uses the supplied key-extracting and value-updating functions to update a Hazelcast `IMap`.
    `static <T> Sink<T>` | Sinks.`noop()` Returns a sink which discards all received items.
    `static <T extends Map.Entry> Sink<T>` | Sinks.`remoteCache(String cacheName, ClientConfig clientConfig)` Returns a sink that puts `Map.Entry`s it receives into a Hazelcast `ICache` with the specified name in a remote cluster identified by the supplied `ClientConfig`.
    `static <T> Sink<T>` | Sinks.`remoteList(String listName, ClientConfig clientConfig)` Returns a sink that adds the items it receives to a Hazelcast `IList` with the specified name in a remote cluster identified by the supplied `ClientConfig`.
    `static <K,V> Sink<Map.Entry<K,V>>` | Sinks.`remoteMap(String mapName, ClientConfig clientConfig)` Returns a sink that puts `Map.Entry`s it receives into a Hazelcast `IMap` with the specified name in a remote cluster identified by the supplied `ClientConfig`.
    `static <E,K,V> Sink<E>` | Sinks.`remoteMapWithEntryProcessor(String mapName, ClientConfig clientConfig, DistributedFunction<? super E,? extends K> toKeyFn, DistributedFunction<? super E,? extends EntryProcessor<K,V>> toEntryProcessorFn)` Returns a sink equivalent to `Sinks.mapWithEntryProcessor(java.lang.String, com.hazelcast.jet.function.DistributedFunction<? super E, ? extends K>, com.hazelcast.jet.function.DistributedFunction<? super E, ? extends com.hazelcast.map.EntryProcessor<K, V>>)`, but for a map in a remote Hazelcast cluster identified by the supplied `ClientConfig`.
    `static <K,V> Sink<Map.Entry<K,V>>` | Sinks.`remoteMapWithMerging(String mapName, ClientConfig clientConfig, DistributedBinaryOperator<V> mergeFn)` Convenience for `Sinks.remoteMapWithMerging(java.lang.String, com.hazelcast.client.config.ClientConfig, com.hazelcast.jet.function.DistributedFunction<? super T, ? extends K>, com.hazelcast.jet.function.DistributedFunction<? super T, ? extends V>, com.hazelcast.jet.function.DistributedBinaryOperator<V>)` with `Map.Entry` as input item.
    `static <T,K,V> Sink<T>` | Sinks.`remoteMapWithMerging(String mapName, ClientConfig clientConfig, DistributedFunction<? super T,? extends K> toKeyFn, DistributedFunction<? super T,? extends V> toValueFn, DistributedBinaryOperator<V> mergeFn)` Returns a sink equivalent to `Sinks.mapWithMerging(String, DistributedBinaryOperator)`, but for a map in a remote Hazelcast cluster identified by the supplied `ClientConfig`.
    `static <K,V,E extends Map.Entry<K,V>> Sink<E>` | Sinks.`remoteMapWithUpdating(String mapName, ClientConfig clientConfig, DistributedBiFunction<? super V,? super E,? extends V> updateFn)` Convenience for `Sinks.remoteMapWithUpdating(java.lang.String, com.hazelcast.client.config.ClientConfig, com.hazelcast.jet.function.DistributedFunction<? super T, ? extends K>, com.hazelcast.jet.function.DistributedBiFunction<? super V, ? super T, ? extends V>)` with `Map.Entry` as input item.
    `static <T,K,V> Sink<T>` | Sinks.`remoteMapWithUpdating(String mapName, ClientConfig clientConfig, DistributedFunction<? super T,? extends K> toKeyFn, DistributedBiFunction<? super V,? super T,? extends V> updateFn)` Returns a sink equivalent to `Sinks.mapWithUpdating(java.lang.String, com.hazelcast.jet.function.DistributedFunction<? super T, ? extends K>, com.hazelcast.jet.function.DistributedBiFunction<? super V, ? super T, ? extends V>)`, but for a map in a remote Hazelcast cluster identified by the supplied `ClientConfig`.
    `static <T> Sink<T>` | Sinks.`socket(String host, int port)` Convenience for `Sinks.socket(String, int, DistributedFunction, Charset)` with `Object.toString` as the conversion function and UTF-8 as the charset.
    `static <T> Sink<T>` | Sinks.`socket(String host, int port, DistributedFunction<? super T,? extends String> toStringFn)` Convenience for `Sinks.socket(String, int, DistributedFunction, Charset)` with UTF-8 as the charset.
    `static <T> Sink<T>` | Sinks.`socket(String host, int port, DistributedFunction<? super T,? extends String> toStringFn, Charset charset)` Returns a sink that connects to the specified TCP socket and writes to it a string representation of the items it receives.

    Methods in com.hazelcast.jet.pipeline with parameters of type Sink
    Modifier and Type | Method and Description
    --- | ---
    `SinkStage` | GeneralStage.`drainTo(Sink<? super T> sink)` Attaches a sink stage, one that accepts data but doesn't emit any.
    `<T> SinkStage` | Pipeline.`drainTo(Sink<? super T> sink, GeneralStage<? extends T> stage0, GeneralStage<? extends T> stage1)` Attaches the supplied sink to two pipeline stages.
    `<T> SinkStage` | Pipeline.`drainTo(Sink<? super T> sink, GeneralStage<? extends T> stage0, GeneralStage<? extends T> stage1, GeneralStage<? extends T>... moreStages)` Attaches the supplied sink to two or more pipeline stages.

Copyright © 2018. All rights reserved.