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

com.kolibrifx.plovercrest.server.internal.streams.RangeReadInfo Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
 */

package com.kolibrifx.plovercrest.server.internal.streams;

import com.kolibrifx.plovercrest.server.streams.ReaderPosition;

public class RangeReadInfo {
    private final int count;
    private final boolean atEndOfStream;
    private final long lastValidTimestamp;
    private final ReaderPosition position;
    private final boolean atEndOfRange;

    public RangeReadInfo(final int count,
                         final boolean atEndOfStream,
                         final long lastValidTimestamp,
                         final ReaderPosition position,
                         final boolean atEndOfRange) {
        this.count = count;
        this.atEndOfStream = atEndOfStream;
        this.lastValidTimestamp = lastValidTimestamp;
        this.position = position;
        this.atEndOfRange = atEndOfRange;
    }

    public ReaderPosition getPosition() {
        return position;
    }

    public int getCount() {
        return count;
    }

    public long getLastValidTimestamp() {
        return lastValidTimestamp;
    }

    public boolean isAtEndOfStream() {
        return atEndOfStream;
    }

    public boolean isAtEndOfRange() {
        return atEndOfRange;
    }

    @Override
    public String toString() {
        return "RangeReadInfo [count=" + count + ", atEndOfStream=" + atEndOfStream + ", lastValidTimestamp="
                + lastValidTimestamp + ", position=" + position + ", atEndOfRange=" + atEndOfRange + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy