Class TwoTableReceiver
java.lang.Object
org.apache.ignite.example.streaming.TwoTableReceiver
- All Implemented Interfaces:
DataStreamerReceiver<Tuple,Void, Tuple>
Custom receiver class that extracts data from the provided source and write it into two separate tables: Customers and Addresses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreceive(List<Tuple> page, DataStreamerReceiverContext ctx, Void arg) Receives an item from the data streamer (seeDataStreamerTarget.streamData(Publisher, DataStreamerReceiverDescriptor, Function, Function, Object, Subscriber, DataStreamerOptions)).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.table.DataStreamerReceiver
argumentMarshaller, payloadMarshaller, resultMarshaller
-
Constructor Details
-
TwoTableReceiver
public TwoTableReceiver()
-
-
Method Details
-
receive
public CompletableFuture<List<Tuple>> receive(List<Tuple> page, DataStreamerReceiverContext ctx, Void arg) Description copied from interface:DataStreamerReceiverReceives an item from the data streamer (seeDataStreamerTarget.streamData(Publisher, DataStreamerReceiverDescriptor, Function, Function, Object, Subscriber, DataStreamerOptions)).The receiver is called for each page (batch) in the data streamer and is responsible for processing the items, updating zero or more tables, and returning a result.
- Specified by:
receivein interfaceDataStreamerReceiver<Tuple,Void, Tuple> - Parameters:
page- Item batch.ctx- Receiver context.arg- Additional argument.- Returns:
- Future with the result. Null future for synchronous completion.
-