Package velox.api.layer1.simplified
Interface IntervalAdapter
- All Superinterfaces:
IntervalListener
public interface IntervalAdapter extends IntervalListener
An adapter for
IntervalListener with empty default method
implementations-
Method Summary
Modifier and Type Method Description default longgetInterval()Return desired interval width in nanoseconds.default voidonInterval()Called with frequency set byIntervalListener.getInterval().
-
Method Details
-
getInterval
default long getInterval()Description copied from interface:IntervalListenerReturn desired interval width in nanoseconds. Should always be larger thanIntervals.MIN_INTERVAL. You can use other constants inIntervalsclass for common intervals, but you are not required to.- Specified by:
getIntervalin interfaceIntervalListener
-
onInterval
default void onInterval()Description copied from interface:IntervalListenerCalled with frequency set byIntervalListener.getInterval(). Useful as replacement forBarDataListener.onBar(velox.api.layer1.layers.utils.OrderBook, Bar)when you don't really need the bar itself and just want a timer functionality (keep in mind, that indicator time is not bound to computer clock, so using general-purpose timers won't work in many cases)- Specified by:
onIntervalin interfaceIntervalListener
-