Package velox.api.layer1.dynamichistory
Record Class LinearDataSlice.Block<T>
java.lang.Object
java.lang.Record
velox.api.layer1.dynamichistory.LinearDataSlice.Block<T>
- Record Components:
index- epoch-anchored absolute block index — a pure function of the block's period (the same period has the same index in every recording), so it is a durable cache keystartTimeNanos- inclusive start of the block's period (epoch nanos)endTimeNanos- exclusive end of the block's period (epoch nanos)value- the decoded payload
- All Implemented Interfaces:
LinearDataSlice.Entry<T>
- Enclosing class:
LinearDataSlice<T>
public static record LinearDataSlice.Block<T>(long index, long startTimeNanos, long endTimeNanos, T value)
extends Record
implements LinearDataSlice.Entry<T>
One decoded block placed on the time axis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theendTimeNanosrecord component.final booleanIndicates whether some other object is "equal to" this one.longEpoch-anchored absolute index of the first block this entry covers.final inthashCode()Returns a hash code value for this object.longindex()Returns the value of theindexrecord component.longEpoch-anchored absolute index of the last block this entry covers (inclusive).longReturns the value of thestartTimeNanosrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Block
Creates an instance of aBlockrecord class.- Parameters:
index- the value for theindexrecord componentstartTimeNanos- the value for thestartTimeNanosrecord componentendTimeNanos- the value for theendTimeNanosrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
firstIndex
public long firstIndex()Description copied from interface:LinearDataSlice.EntryEpoch-anchored absolute index of the first block this entry covers.- Specified by:
firstIndexin interfaceLinearDataSlice.Entry<T>
-
lastIndex
public long lastIndex()Description copied from interface:LinearDataSlice.EntryEpoch-anchored absolute index of the last block this entry covers (inclusive).- Specified by:
lastIndexin interfaceLinearDataSlice.Entry<T>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord 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
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-