com.kolibrifx.plovercrest.server.internal.streams.RangeReadInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
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 + "]";
}
}