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

io.debezium.ibmi.db2.journal.retrieve.rjne0200.FirstHeader Maven / Gradle / Ivy

There is a newer version: 3.0.3.Final
Show newest version
/*
 * Copyright Debezium Authors.
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package io.debezium.ibmi.db2.journal.retrieve.rjne0200;

import io.debezium.ibmi.db2.journal.retrieve.JournalProcessedPosition;

public record FirstHeader(int totalBytes, int offset, int size, OffsetStatus status,
        JournalProcessedPosition nextPosition) {

    public boolean hasData() {
        return status == OffsetStatus.MORE_DATA_NEW_OFFSET || offset > 0;
    }

    @Override
    public String toString() {
        return String.format("FirstHeader [totalBytes=%s, offset=%s, size=%s, status=%s, nextPosition=%s]", totalBytes,
                offset, size, status, nextPosition);
    }

    public boolean hasFutureDataAvailable() {
        return status == OffsetStatus.MORE_DATA_NEW_OFFSET;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy