Package deltix.qsrv.hf.stream
Class MessageWriter2
- java.lang.Object
-
- deltix.qsrv.hf.stream.AbstractMessageWriter
-
- deltix.qsrv.hf.stream.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.
-
-
Constructor Summary
Constructors Constructor Description MessageWriter2(java.io.OutputStream out, deltix.util.time.Interval periodicity, TypeLoader loader, CodecFactory codecFactory, RecordClassDescriptor... descriptors)
MessageWriter2(java.io.OutputStream out, deltix.util.time.Interval periodicity, TypeLoader loader, RecordClassDescriptor... descriptors)
MessageWriter2(java.io.OutputStream out, deltix.util.time.Interval periodicity, java.lang.Class... classes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static MessageWriter2
create(java.io.File f, int bufferSize, deltix.util.time.Interval periodicity, TypeLoader loader, RecordClassDescriptor... cds)
static MessageWriter2
create(java.io.File f, int bufferSize, deltix.util.time.Interval periodicity, java.lang.Class... cds)
static MessageWriter2
create(java.io.File f, deltix.util.time.Interval periodicity, TypeLoader loader, RecordClassDescriptor... cds)
static MessageWriter2
create(java.io.File f, java.lang.Class... cds)
static java.io.OutputStream
createOutputStream(java.io.File f, int bufferSize)
void
flush()
void
send(deltix.qsrv.hf.pub.InstrumentMessage msg)
-
Methods inherited from class deltix.qsrv.hf.stream.AbstractMessageWriter
addNew, encode, getTypeIndex, getTypeIndex, getTypes, set, writeHeader
-
-
-
-
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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacedeltix.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 interfacedeltix.data.stream.MessageChannel<deltix.qsrv.hf.pub.InstrumentMessage>
-
-