
io.numaproj.numaflow.mapstreamer.MessageList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of numaflow-java Show documentation
Show all versions of numaflow-java Show documentation
SDK to implement Numaflow Source or User Defined Functions or Sinks in Java.
package io.numaproj.numaflow.mapstreamer;
import lombok.Builder;
import lombok.Getter;
import lombok.Singular;
import java.util.ArrayList;
import java.util.Collection;
/**
* MessageList is used to return the list of Messages returned from MapStreamer.
*/
@Getter
@Builder(builderMethodName = "newBuilder")
public class MessageList {
@Singular("addMessage")
private Iterable messages;
/**
* Builder to build MessageList
*/
public static class MessageListBuilder {
/**
*
* @param messages to append all the messages to MessageList
* @return returns the builder
*/
public MessageListBuilder addMessages(Iterable messages) {
if (this.messages == null) {
this.messages = new ArrayList<>();
return this;
}
this.messages.addAll((Collection extends Message>) messages);
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy