Class BaseGenerator<T>

  • All Implemented Interfaces:
    deltix.data.stream.MessageSource<T>, deltix.util.concurrent.AbstractCursor, deltix.util.lang.Disposable, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    DataGenerator

    public abstract class BaseGenerator<T>
    extends java.lang.Object
    implements deltix.data.stream.MessageSource<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.GregorianCalendar calendar  
      protected T current  
      protected java.util.Random rnd  
      protected CycleIterator<java.lang.String> symbols  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseGenerator​(java.util.GregorianCalendar calendar, int interval, java.lang.String... tickers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      long getActualTime()  
      T getMessage()  
      protected long getNextTime()  
      protected double nextDouble()  
      void setSymbols​(java.lang.String... tickers)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface deltix.util.concurrent.AbstractCursor

        isAtEnd, next
    • Field Detail

      • rnd

        protected final java.util.Random rnd
      • calendar

        protected java.util.GregorianCalendar calendar
      • current

        protected T current
    • Constructor Detail

      • BaseGenerator

        protected BaseGenerator​(java.util.GregorianCalendar calendar,
                                int interval,
                                java.lang.String... tickers)
    • Method Detail

      • nextDouble

        protected double nextDouble()
      • getMessage

        public T getMessage()
        Specified by:
        getMessage in interface deltix.data.stream.MessageSource<T>
      • getNextTime

        protected long getNextTime()
      • getActualTime

        public long getActualTime()
      • setSymbols

        public void setSymbols​(java.lang.String... tickers)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface deltix.util.lang.Disposable