Interface DataStreamerTarget<T>

Type Parameters:
T - Entry type.
All Known Subinterfaces:
KeyValueView<K,V>, RecordView<R>

public interface DataStreamerTarget<T>
Represents an entity that can be used as a target for streaming data.
  • Method Details

    • streamData

      CompletableFuture<Void> streamData(Flow.Publisher<DataStreamerItem<T>> publisher, @Nullable @Nullable DataStreamerOptions options)
      Streams data into the underlying table.
      Parameters:
      publisher - Producer.
      options - Options (can be null).
      Returns:
      Future that will be completed when the stream is finished.
    • streamData

      <E, V, R, A> CompletableFuture<Void> streamData(Flow.Publisher<E> publisher, Function<E,T> keyFunc, Function<E,V> payloadFunc, ReceiverDescriptor<A> receiver, @Nullable Flow.Subscriber<R> resultSubscriber, @Nullable @Nullable DataStreamerOptions options, @Nullable A receiverArg)
      Streams data with receiver. The receiver is responsible for processing the data and updating zero or more tables.
      Type Parameters:
      E - Producer item type.
      V - Payload type.
      R - Result type.
      A - Receiver job argument type.
      Parameters:
      publisher - Producer.
      keyFunc - Key function. The key is only used locally for colocation.
      payloadFunc - Payload function. The payload is sent to the receiver.
      resultSubscriber - Optional subscriber for the receiver results. NOTE: The result subscriber follows the pace of publisher and ignores backpressure from Flow.Subscription.request(long) calls.
      options - Options (can be null).
      receiverArg - Receiver arguments.
      Returns:
      Future that will be completed when the stream is finished.