use of org.apache.cassandra.streaming.StreamWriter in project cassandra by apache.
the class OutgoingFileMessage method serialize.
public synchronized void serialize(DataOutputStreamPlus out, int version, StreamSession session) throws IOException {
if (completed) {
return;
}
CompressionInfo compressionInfo = FileMessageHeader.serializer.serialize(header, out, version);
final SSTableReader reader = ref.get();
StreamWriter writer = compressionInfo == null ? new StreamWriter(reader, header.sections, session) : new CompressedStreamWriter(reader, header.sections, compressionInfo, session);
writer.write(out);
}
Aggregations