Class SimpleOhlcvReplayDataSet

  • All Implemented Interfaces:
    de.gsi.dataset.DataSet, de.gsi.dataset.DataSetMetaData, de.gsi.dataset.event.EventSource, de.gsi.dataset.spi.financial.api.attrs.AttributeModelAware, de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItemAware, java.io.Serializable, java.lang.Iterable<de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItem>

    public class SimpleOhlcvReplayDataSet
    extends de.gsi.dataset.spi.financial.OhlcvDataSet
    implements java.lang.Iterable<de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItem>, de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItemAware, de.gsi.dataset.spi.financial.api.attrs.AttributeModelAware
    Very simple financial OHLC replay data set. The service is used just for simple testing of OHLC chart changes and performance.
    Author:
    afischer
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOhlcvChangeListener​(OhlcvChangeListener ohlcvChangeListener)  
      void fillTestData​(IntradayPeriod period, Interval<java.util.Calendar> timeRange, Interval<java.util.Calendar> tt, java.util.Calendar replayFrom)  
      protected void fireOhlcvTickEvent​(de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItem ohlcvItem)  
      protected java.lang.Runnable getDataUpdateTask()  
      SimpleOhlcvReplayDataSet.DataInput getInputSource()  
      java.lang.String getResource()  
      void pauseResume()
      pause/resume play back of the data source via the sound card
      void setInputSource​(SimpleOhlcvReplayDataSet.DataInput inputSource)  
      void setUpdatePeriod​(double updatePeriod)
      Update replay interval
      void start()
      starts play back of the data source via the sound card
      void step()  
      void stop()
      stops and resets play back of the data source via the sound card
      protected void tick()  
      • Methods inherited from class de.gsi.dataset.spi.financial.OhlcvDataSet

        get, getAddon, getAddonOrCreate, getData, getDataCount, getItem, getLastItem, getXIndex, isCategoryBased, iterator, set, setCategoryBased, setData
      • Methods inherited from class de.gsi.dataset.spi.AbstractDataSet

        addDataLabel, addDataStyle, autoNotification, binarySearch, binarySearch, clearMetaInfo, copyAxisDescription, copyDataLabelsAndStyles, copyMetaData, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getThis, getValue, getValues, getWarningList, hashCode, lock, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
      • Methods inherited from class de.gsi.dataset.spi.AbstractStylable

        getStyle, setStyle
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface de.gsi.dataset.spi.financial.api.attrs.AttributeModelAware

        getAddon, getAddonOrCreate
      • Methods inherited from interface de.gsi.dataset.DataSet

        getAxisDescription, getStyle, set, setStyle
      • Methods inherited from interface de.gsi.dataset.event.EventSource

        addListener, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener
      • Methods inherited from interface de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItemAware

        getItem
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • Field Detail

      • running

        protected volatile boolean running
      • paused

        protected volatile boolean paused
      • pause

        protected final transient java.lang.Object pause
      • maxXIndex

        protected int maxXIndex
    • Method Detail

      • addOhlcvChangeListener

        public void addOhlcvChangeListener​(OhlcvChangeListener ohlcvChangeListener)
      • fillTestData

        public void fillTestData​(IntradayPeriod period,
                                 Interval<java.util.Calendar> timeRange,
                                 Interval<java.util.Calendar> tt,
                                 java.util.Calendar replayFrom)
      • tick

        protected void tick()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • fireOhlcvTickEvent

        protected void fireOhlcvTickEvent​(de.gsi.dataset.spi.financial.api.ohlcv.IOhlcvItem ohlcvItem)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getResource

        public java.lang.String getResource()
      • pauseResume

        public void pauseResume()
        pause/resume play back of the data source via the sound card
      • setUpdatePeriod

        public void setUpdatePeriod​(double updatePeriod)
        Update replay interval
        Parameters:
        updatePeriod - replay multiple 1.0-N
      • start

        public void start()
        starts play back of the data source via the sound card
      • step

        public void step()
      • stop

        public void stop()
        stops and resets play back of the data source via the sound card
      • getDataUpdateTask

        protected java.lang.Runnable getDataUpdateTask()