Package io.pravega.client.stream.impl
Class StreamSegments
- java.lang.Object
-
- io.pravega.client.control.impl.SegmentCollection
-
- io.pravega.client.stream.impl.StreamSegments
-
public class StreamSegments extends SegmentCollection
The segments that within a stream at a particular point in time.
-
-
Field Summary
-
Fields inherited from class io.pravega.client.control.impl.SegmentCollection
segments
-
-
Constructor Summary
Constructors Constructor Description StreamSegments(java.util.NavigableMap<java.lang.Double,SegmentWithRange> segments)
Creates a new instance of the StreamSegments class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
int
getNumberOfSegments()
int
hashCode()
protected double
hashToRange(java.lang.String key)
StreamSegments
withReplacementRange(Segment segment, StreamSegmentsWithPredecessors replacementRanges)
-
Methods inherited from class io.pravega.client.control.impl.SegmentCollection
getSegmentForKey, getSegmentForKey, getSegments, toString
-
-
-
-
Constructor Detail
-
StreamSegments
public StreamSegments(java.util.NavigableMap<java.lang.Double,SegmentWithRange> segments)
Creates a new instance of the StreamSegments class.- Parameters:
segments
- Segments of a stream, keyed by the largest key in their key range. i.e. If there are two segments split evenly, the first should have a value of 0.5 and the second 1.0.
-
-
Method Detail
-
hashToRange
protected double hashToRange(java.lang.String key)
- Specified by:
hashToRange
in classSegmentCollection
-
getNumberOfSegments
public int getNumberOfSegments()
-
withReplacementRange
public StreamSegments withReplacementRange(Segment segment, StreamSegmentsWithPredecessors replacementRanges)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classSegmentCollection
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classSegmentCollection
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSegmentCollection
-
-