Package velox.api.layer1.dynamichistory
Record Class LinearDataSlice.Gap<T>
java.lang.Object
java.lang.Record
velox.api.layer1.dynamichistory.LinearDataSlice.Gap<T>
- Record Components:
firstIndex- absolute index of the first missing blocklastIndex- absolute index of the last missing block (inclusive)startTimeNanos- inclusive start of the missing period (epoch nanos)endTimeNanos- exclusive end of the missing period (epoch nanos)
- All Implemented Interfaces:
LinearDataSlice.Entry<T>
- Enclosing class:
LinearDataSlice<T>
public static record LinearDataSlice.Gap<T>(long firstIndex, long lastIndex, long startTimeNanos, long endTimeNanos)
extends Record
implements LinearDataSlice.Entry<T>
A run of consecutive blocks the server does not have. Its time span is exact: it starts where
the preceding block ends and ends where the following block starts.
-
Constructor Summary
ConstructorsConstructorDescriptionGap(long firstIndex, long lastIndex, long startTimeNanos, long endTimeNanos) Creates an instance of aGaprecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongNumber of blocks missing.longReturns the value of theendTimeNanosrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefirstIndexrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastIndexrecord component.longReturns the value of thestartTimeNanosrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Gap
public Gap(long firstIndex, long lastIndex, long startTimeNanos, long endTimeNanos) Creates an instance of aGaprecord class.- Parameters:
firstIndex- the value for thefirstIndexrecord componentlastIndex- the value for thelastIndexrecord componentstartTimeNanos- the value for thestartTimeNanosrecord componentendTimeNanos- the value for theendTimeNanosrecord component
-
-
Method Details
-
blockCount
public long blockCount()Number of blocks missing. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
firstIndex
public long firstIndex()Returns the value of thefirstIndexrecord component.- Specified by:
firstIndexin interfaceLinearDataSlice.Entry<T>- Returns:
- the value of the
firstIndexrecord component
-
lastIndex
public long lastIndex()Returns the value of thelastIndexrecord component.- Specified by:
lastIndexin interfaceLinearDataSlice.Entry<T>- Returns:
- the value of the
lastIndexrecord component
-
startTimeNanos
public long startTimeNanos()Returns the value of thestartTimeNanosrecord component.- Specified by:
startTimeNanosin interfaceLinearDataSlice.Entry<T>- Returns:
- the value of the
startTimeNanosrecord component
-
endTimeNanos
public long endTimeNanos()Returns the value of theendTimeNanosrecord component.- Specified by:
endTimeNanosin interfaceLinearDataSlice.Entry<T>- Returns:
- the value of the
endTimeNanosrecord component
-