Class LimitedMessageSource

  • All Implemented Interfaces:
    deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>, deltix.util.concurrent.AbstractCursor, deltix.util.lang.Disposable, java.io.Closeable, java.lang.AutoCloseable

    public class LimitedMessageSource
    extends java.lang.Object
    implements deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
    MessageSource that simulates end-of-stream at given timestamp
    • Constructor Summary

      Constructors 
      Constructor Description
      LimitedMessageSource​(deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> delegate, long limit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      deltix.qsrv.hf.pub.InstrumentMessage getMessage()  
      boolean isAtEnd()  
      boolean next()  
      • Methods inherited from class java.lang.Object

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

      • LimitedMessageSource

        public LimitedMessageSource​(deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> delegate,
                                    long limit)
    • Method Detail

      • getMessage

        public deltix.qsrv.hf.pub.InstrumentMessage getMessage()
        Specified by:
        getMessage in interface deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage>
      • isAtEnd

        public boolean isAtEnd()
        Specified by:
        isAtEnd in interface deltix.util.concurrent.AbstractCursor
      • next

        public boolean next()
        Specified by:
        next in interface deltix.util.concurrent.AbstractCursor
      • 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