本文整理汇总了Java中org.apache.cassandra.streaming.StreamWriter类的典型用法代码示例。如果您正苦于以下问题:Java StreamWriter类的具体用法?Java StreamWriter怎么用?Java StreamWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StreamWriter类属于org.apache.cassandra.streaming包,在下文中一共展示了StreamWriter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: serialize
import org.apache.cassandra.streaming.StreamWriter; //导入依赖的package包/类
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);
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:17,代码来源:OutgoingFileMessage.java
示例2: serialize
import org.apache.cassandra.streaming.StreamWriter; //导入依赖的package包/类
public void serialize(OutgoingFileMessage message, DataOutputStreamAndChannel out, int version, StreamSession session) throws IOException
{
FileMessageHeader.serializer.serialize(message.header, out, version);
final SSTableReader reader = message.sstable;
StreamWriter writer = message.header.compressionInfo == null ?
new StreamWriter(reader, message.header.sections, session) :
new CompressedStreamWriter(reader,
message.header.sections,
message.header.compressionInfo, session);
writer.write(out.getChannel());
session.fileSent(message.header);
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:14,代码来源:OutgoingFileMessage.java
示例3: serialize
import org.apache.cassandra.streaming.StreamWriter; //导入依赖的package包/类
public void serialize(FileMessage message, WritableByteChannel out, int version, StreamSession session) throws IOException
{
DataOutput output = new DataOutputStream(Channels.newOutputStream(out));
FileMessageHeader.serializer.serialize(message.header, output, version);
StreamWriter writer = message.header.compressionInfo == null ?
new StreamWriter(message.sstable, message.header.sections, session) :
new CompressedStreamWriter(message.sstable,
message.header.sections,
message.header.compressionInfo, session);
writer.write(out);
session.fileSent(message.header);
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:13,代码来源:FileMessage.java
注:本文中的org.apache.cassandra.streaming.StreamWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论