Package io.pravega.client.stream
Class TimeWindow
- java.lang.Object
- 
- io.pravega.client.stream.TimeWindow
 
- 
 public class TimeWindow extends java.lang.ObjectRepresents a time window for the events which are currently being read by a reader. The lower time bound is a timestamp which is less than or equal to the most recent value provided via theEventStreamWriter.noteTime(long)API for by any writer using that API at the current location in the stream. If the reader is near the beginning (or the truncation point) of the stream, there may be no timestamps to compare against and no lower bound can be established. Similarly the upper time bound is a timestamp which is greater than or equal to any that were provided by any writer via theEventStreamWriter.noteTime(long)API prior to the current location in the stream. If a reader is near the end (tail) of the stream there may be no writer timestamps to compare against and no upper bound can be established. upperTimeBound will always be greater than or equal to lowerTimeBound.
- 
- 
Constructor SummaryConstructors Constructor Description TimeWindow(java.lang.Long lowerTimeBound, java.lang.Long upperTimeBound)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.LonggetLowerTimeBound()java.lang.LonggetUpperTimeBound()inthashCode()booleanisNearHeadOfStream()Returns true if the reader is currently near the head of the stream and therefore no lower time bound can be obtained.booleanisNearTailOfStream()Returns true if the reader is currently near the tail of the stream and therefore no upper time bound can be obtained.java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
isNearTailOfStreampublic boolean isNearTailOfStream() Returns true if the reader is currently near the tail of the stream and therefore no upper time bound can be obtained.- Returns:
- if a upper bound is unavailable.
 
 - 
isNearHeadOfStreampublic boolean isNearHeadOfStream() Returns true if the reader is currently near the head of the stream and therefore no lower time bound can be obtained.- Returns:
- if a lower bound is unavailable.
 
 - 
getLowerTimeBoundpublic java.lang.Long getLowerTimeBound() 
 - 
getUpperTimeBoundpublic java.lang.Long getUpperTimeBound() 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
canEqualprotected boolean canEqual(java.lang.Object other) 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-