本文整理汇总了Java中org.apache.cassandra.streaming.compress.CompressedStreamReader类的典型用法代码示例。如果您正苦于以下问题:Java CompressedStreamReader类的具体用法?Java CompressedStreamReader怎么用?Java CompressedStreamReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CompressedStreamReader类属于org.apache.cassandra.streaming.compress包,在下文中一共展示了CompressedStreamReader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deserialize
import org.apache.cassandra.streaming.compress.CompressedStreamReader; //导入依赖的package包/类
public IncomingFileMessage deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException
{
DataInputStream input = new DataInputStream(Channels.newInputStream(in));
FileMessageHeader header = FileMessageHeader.serializer.deserialize(input, version);
StreamReader reader = header.compressionInfo == null ? new StreamReader(header, session)
: new CompressedStreamReader(header, session);
try
{
return new IncomingFileMessage(reader.read(in), header);
}
catch (Throwable t)
{
JVMStabilityInspector.inspectThrowable(t);
session.doRetry(header, t);
return null;
}
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:19,代码来源:IncomingFileMessage.java
示例2: deserialize
import org.apache.cassandra.streaming.compress.CompressedStreamReader; //导入依赖的package包/类
public FileMessage deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException
{
DataInputStream input = new DataInputStream(Channels.newInputStream(in));
FileMessageHeader header = FileMessageHeader.serializer.deserialize(input, version);
StreamReader reader = header.compressionInfo == null ? new StreamReader(header, session)
: new CompressedStreamReader(header, session);
try
{
return new FileMessage(reader.read(in), header);
}
catch (Throwable e)
{
session.doRetry(header, e);
return null;
}
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:18,代码来源:FileMessage.java
示例3: deserialize
import org.apache.cassandra.streaming.compress.CompressedStreamReader; //导入依赖的package包/类
@SuppressWarnings("resource")
public IncomingFileMessage deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException
{
DataInputPlus input = new DataInputStreamPlus(Channels.newInputStream(in));
FileMessageHeader header = FileMessageHeader.serializer.deserialize(input, version);
StreamReader reader = !header.isCompressed() ? new StreamReader(header, session)
: new CompressedStreamReader(header, session);
try
{
return new IncomingFileMessage(reader.read(in), header);
}
catch (Throwable t)
{
JVMStabilityInspector.inspectThrowable(t);
throw t;
}
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:19,代码来源:IncomingFileMessage.java
示例4: deserialize
import org.apache.cassandra.streaming.compress.CompressedStreamReader; //导入依赖的package包/类
public IncomingFileMessage deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException
{
DataInputStream input = new DataInputStream(Channels.newInputStream(in));
FileMessageHeader header = FileMessageHeader.serializer.deserialize(input, version);
StreamReader reader = header.compressionInfo == null ? new StreamReader(header, session)
: new CompressedStreamReader(header, session);
try
{
return new IncomingFileMessage(reader.read(in), header);
}
catch (Throwable e)
{
session.doRetry(header, e);
return null;
}
}
开发者ID:daidong,项目名称:GraphTrek,代码行数:18,代码来源:IncomingFileMessage.java
注:本文中的org.apache.cassandra.streaming.compress.CompressedStreamReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论