Package io.pravega.client.segment.impl
Class SegmentInfo
- java.lang.Object
-
- io.pravega.client.segment.impl.SegmentInfo
-
@Beta public class SegmentInfo extends java.lang.ObjectInformation about a segment of a stream.
-
-
Constructor Summary
Constructors Constructor Description SegmentInfo(Segment segment, long startingOffset, long writeOffset, boolean isSealed, long lastModifiedTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)longgetLastModifiedTime()The last time the segment was written to.SegmentgetSegment()Which segment these properties relate to.longgetStartingOffset()The offset at which data is available.longgetWriteOffset()The offset at which new data would be written if it were to be added.inthashCode()booleanisSealed()If the segment is sealed and can no longer be written to.java.lang.StringtoString()
-
-
-
Constructor Detail
-
SegmentInfo
@ConstructorProperties({"segment","startingOffset","writeOffset","isSealed","lastModifiedTime"}) public SegmentInfo(Segment segment, long startingOffset, long writeOffset, boolean isSealed, long lastModifiedTime)
-
-
Method Detail
-
getSegment
public Segment getSegment()
Which segment these properties relate to.
-
getStartingOffset
public long getStartingOffset()
The offset at which data is available. In the event the stream has never been truncated this is 0. However, if all data below a certain offset has been truncated, that offset will be provide here. (Offsets are left absolute even if data is truncated so that positions in the segment can be referred to consistently)
-
getWriteOffset
public long getWriteOffset()
The offset at which new data would be written if it were to be added. This is equal to the total length of all data written to the segment.
-
isSealed
public boolean isSealed()
If the segment is sealed and can no longer be written to.
-
getLastModifiedTime
public long getLastModifiedTime()
The last time the segment was written to.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-