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 booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)intgetNumberOfSegments()inthashCode()protected doublehashToRange(java.lang.String key)StreamSegmentswithReplacementRange(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:
hashToRangein classSegmentCollection
-
getNumberOfSegments
public int getNumberOfSegments()
-
withReplacementRange
public StreamSegments withReplacementRange(Segment segment, StreamSegmentsWithPredecessors replacementRanges)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classSegmentCollection
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqualin classSegmentCollection
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSegmentCollection
-
-