io.numaproj.numaflow.sink.HandlerDatum 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.sink;
import io.numaproj.numaflow.sink.interfaces.Datum;
import lombok.AllArgsConstructor;
import java.time.Instant;
@AllArgsConstructor
class HandlerDatum implements Datum {
private String[] keys;
private byte[] value;
private Instant watermark;
private Instant eventTime;
private String id;
private Boolean eof;
// poison packet for reduce stream, to indicate EOF
public static HandlerDatum EOF() {
return new HandlerDatum(null, null, null, null, null, true);
}
@Override
public String[] getKeys() {
return keys;
}
@Override
public Instant getWatermark() {
return this.watermark;
}
@Override
public byte[] getValue() {
return this.value;
}
@Override
public Instant getEventTime() {
return this.eventTime;
}
@Override
public String getId() {
return id;
}
}