Package deltix.qsrv.testsetup
Class BaseGenerator<T>
- java.lang.Object
-
- deltix.qsrv.testsetup.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>
-
-
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)
-
-
-
Field Detail
-
rnd
protected final java.util.Random rnd
-
calendar
protected java.util.GregorianCalendar calendar
-
current
protected T current
-
symbols
protected CycleIterator<java.lang.String> symbols
-
-
Method Detail
-
nextDouble
protected double nextDouble()
-
getMessage
public T getMessage()
- Specified by:
getMessage
in interfacedeltix.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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacedeltix.util.lang.Disposable
-
-