Class MessageWriter2

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

    public class MessageWriter2
    extends AbstractMessageWriter
    implements deltix.data.stream.MessageChannel<deltix.qsrv.hf.pub.InstrumentMessage>
    This class is thread-unsafe.
    • Field Detail

      • buffer

        protected final deltix.util.memory.MemoryDataOutput buffer
    • Constructor Detail

      • MessageWriter2

        public MessageWriter2​(java.io.OutputStream out,
                              deltix.util.time.Interval periodicity,
                              java.lang.Class... classes)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • MessageWriter2

        public MessageWriter2​(java.io.OutputStream out,
                              deltix.util.time.Interval periodicity,
                              TypeLoader loader,
                              RecordClassDescriptor... descriptors)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • MessageWriter2

        public MessageWriter2​(java.io.OutputStream out,
                              deltix.util.time.Interval periodicity,
                              TypeLoader loader,
                              CodecFactory codecFactory,
                              RecordClassDescriptor... descriptors)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
    • Method Detail

      • create

        public static MessageWriter2 create​(java.io.File f,
                                            java.lang.Class... cds)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createOutputStream

        public static java.io.OutputStream createOutputStream​(java.io.File f,
                                                              int bufferSize)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • create

        public static MessageWriter2 create​(java.io.File f,
                                            int bufferSize,
                                            deltix.util.time.Interval periodicity,
                                            java.lang.Class... cds)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • create

        public static MessageWriter2 create​(java.io.File f,
                                            deltix.util.time.Interval periodicity,
                                            TypeLoader loader,
                                            RecordClassDescriptor... cds)
                                     throws java.io.IOException,
                                            java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • create

        public static MessageWriter2 create​(java.io.File f,
                                            int bufferSize,
                                            deltix.util.time.Interval periodicity,
                                            TypeLoader loader,
                                            RecordClassDescriptor... cds)
                                     throws java.io.IOException,
                                            java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • 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
      • flush

        public void flush()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • send

        public void send​(deltix.qsrv.hf.pub.InstrumentMessage msg)
        Specified by:
        send in interface deltix.data.stream.MessageChannel<deltix.qsrv.hf.pub.InstrumentMessage>