Class TimebaseTestUtils


  • public final class TimebaseTestUtils
    extends java.lang.Object
    Description: deltix.qsrv.hf.tickdb.TimebaseTestUtils Date: Mar 19, 2010
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static deltix.timebase.api.messages.BarMessage createBar​(deltix.qsrv.hf.pub.InstrumentIdentity instrument, long timestamp, double open, double close, double high, double low, double volume)  
      static deltix.timebase.api.messages.BestBidOfferMessage createBBO​(deltix.qsrv.hf.pub.InstrumentIdentity instrument, long timestamp, double bidPrice, double bidSize, double offerPrice, double offerSize)  
      static void createFileStream​(java.lang.String timebasePath, java.lang.String streamKey, java.lang.String messageFilePath)  
      static deltix.timebase.api.messages.MarketMessage createTestMessage​(java.util.Random rnd, deltix.timebase.api.MarketMessageType type, deltix.qsrv.hf.pub.InstrumentType entityType, java.lang.String symbol, long timestamp)  
      static deltix.timebase.api.messages.MarketMessage createTestMessage​(java.util.Random rnd, java.lang.Class<? extends deltix.timebase.api.messages.MarketMessage> type, deltix.qsrv.hf.pub.InstrumentType entityType, java.lang.String symbol, long timestamp)  
      static deltix.timebase.api.messages.TradeMessage createTrade​(deltix.qsrv.hf.pub.InstrumentIdentity instrument, long timestamp, double price, double size)  
      static void importFromFile​(java.lang.String timebasePath, java.lang.String streamKey, int df, java.lang.String messageFilePath)  
      static java.lang.String messageToString​(deltix.qsrv.hf.pub.InstrumentMessage msg)  
      static void populateStream​(DXTickStream stream, deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> source)  
      static void printCursor​(deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> cur, java.io.PrintWriter out)  
      static void printMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg, java.io.PrintWriter out)  
      static void recreateTimebase​(java.lang.String location)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimebaseTestUtils

        public TimebaseTestUtils()
    • Method Detail

      • recreateTimebase

        public static void recreateTimebase​(java.lang.String location)
      • createFileStream

        public static void createFileStream​(java.lang.String timebasePath,
                                            java.lang.String streamKey,
                                            java.lang.String messageFilePath)
                                     throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • importFromFile

        public static void importFromFile​(java.lang.String timebasePath,
                                          java.lang.String streamKey,
                                          int df,
                                          java.lang.String messageFilePath)
                                   throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • populateStream

        public static void populateStream​(DXTickStream stream,
                                          deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> source)
      • createBBO

        public static deltix.timebase.api.messages.BestBidOfferMessage createBBO​(deltix.qsrv.hf.pub.InstrumentIdentity instrument,
                                                                                 long timestamp,
                                                                                 double bidPrice,
                                                                                 double bidSize,
                                                                                 double offerPrice,
                                                                                 double offerSize)
      • createTrade

        public static deltix.timebase.api.messages.TradeMessage createTrade​(deltix.qsrv.hf.pub.InstrumentIdentity instrument,
                                                                            long timestamp,
                                                                            double price,
                                                                            double size)
      • createBar

        public static deltix.timebase.api.messages.BarMessage createBar​(deltix.qsrv.hf.pub.InstrumentIdentity instrument,
                                                                        long timestamp,
                                                                        double open,
                                                                        double close,
                                                                        double high,
                                                                        double low,
                                                                        double volume)
      • createTestMessage

        public static deltix.timebase.api.messages.MarketMessage createTestMessage​(java.util.Random rnd,
                                                                                   deltix.timebase.api.MarketMessageType type,
                                                                                   deltix.qsrv.hf.pub.InstrumentType entityType,
                                                                                   java.lang.String symbol,
                                                                                   long timestamp)
      • createTestMessage

        public static deltix.timebase.api.messages.MarketMessage createTestMessage​(java.util.Random rnd,
                                                                                   java.lang.Class<? extends deltix.timebase.api.messages.MarketMessage> type,
                                                                                   deltix.qsrv.hf.pub.InstrumentType entityType,
                                                                                   java.lang.String symbol,
                                                                                   long timestamp)
      • printCursor

        public static void printCursor​(deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> cur,
                                       java.io.PrintWriter out)
      • printMessage

        public static void printMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg,
                                        java.io.PrintWriter out)
      • messageToString

        public static java.lang.String messageToString​(deltix.qsrv.hf.pub.InstrumentMessage msg)