Class Sources

java.lang.Object
com.hazelcast.enterprise.jet.pipeline.Sources

public final class Sources extends Object
Contains factory methods for various types of pipeline sources. To start building a pipeline, pass a source to Pipeline.readFrom(BatchSource) and you will obtain the initial BatchStage. You can then attach further stages to it.

The same pipeline may contain more than one source, each starting its own branch. The branches may be merged with multiple-input transforms such as co-group and hash-join.

Since:
Jet 5.4
  • Method Details

    • udp

      @Beta public static <T> com.hazelcast.jet.pipeline.StreamSource<T> udp(@Nonnull String host, int port, String networkInterface, @Nonnull StandardProtocolFamily protocolFamily, Integer receiveBufferSize, @Nonnull com.hazelcast.function.BiFunctionEx<byte[],SocketAddress,T> projectionFn)
      Returns a source that connects to the given UDP socket and emits items received from it. The source never completes.

      The source can be configured to use multicast if a multicast host is provided, along with a network interface to use for multicast.

      The source can be configured to use a custom buffer size for receiving packets. If receiveBufferSize is null, the default buffer size is used.

      Type Parameters:
      T - the type of the emitted items.
      Parameters:
      host - the host to bind to.
      port - the port to bind to.
      networkInterface - the network interface to use for multicast.
      protocolFamily - the protocol family to use.
      receiveBufferSize - the size of the buffer to use for receiving packets. If null, the default buffer size is used.
      projectionFn - the function to transform the received data before moving it to the outbox.
      Returns:
      the source.