All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.numaproj.numaflow.sink.HandlerDatum Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy