Record Class Layer1ApiDynamicHistoryListener.BlockContext
- Record Components:
timeFrom- start of the block's window, in nanoseconds (exclusive), in chart timetimeTo- end of the block's window, in nanoseconds (inclusive), in chart time - the window is(timeFrom, timeTo], seeDynamicHistoryEventdataDelayNs- the shift Bookmap applied to the window, in nanoseconds;0when the instrument is not delayed or its delay is unknown
- Enclosing interface:
Layer1ApiDynamicHistoryListener
Bookmap shows a delayed instrument's data shifted forward by its delay
(InstrumentInfo.dataDelay), while the history server stores it in
the time it happened. The window below is already shifted into the time the chart shows (the same
time DynamicHistoryAccessInterface.get(long, long, int, com.bookmap.api.treestructure.DataSource, velox.api.layer1.data.InstrumentInfo, java.util.List<com.bookmap.api.treestructure.TreeId>, velox.api.layer1.dynamichistory.DynamicHistoryAccessInterface.AsyncResultConsumer) is called with), so an event built with these bounds
lines up with live data. What Bookmap cannot shift is the content of the aggregation itself: if the
aggregation carries absolute timestamps of its own (a candle's publish time, say), add
dataDelayNs to them.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockContext(long timeFrom, long timeTo, long dataDelayNs) Creates an instance of aBlockContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedataDelayNsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longtimeFrom()Returns the value of thetimeFromrecord component.longtimeTo()Returns the value of thetimeTorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockContext
public BlockContext(long timeFrom, long timeTo, long dataDelayNs) Creates an instance of aBlockContextrecord class.- Parameters:
timeFrom- the value for thetimeFromrecord componenttimeTo- the value for thetimeTorecord componentdataDelayNs- the value for thedataDelayNsrecord component
-
-
Method Details
-
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 '=='. -
timeFrom
public long timeFrom()Returns the value of thetimeFromrecord component.- Returns:
- the value of the
timeFromrecord component
-
timeTo
public long timeTo()Returns the value of thetimeTorecord component.- Returns:
- the value of the
timeTorecord component
-
dataDelayNs
public long dataDelayNs()Returns the value of thedataDelayNsrecord component.- Returns:
- the value of the
dataDelayNsrecord component
-