• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CompactEndpointSerializationHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.cassandra.net.CompactEndpointSerializationHelper的典型用法代码示例。如果您正苦于以下问题:Java CompactEndpointSerializationHelper类的具体用法?Java CompactEndpointSerializationHelper怎么用?Java CompactEndpointSerializationHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CompactEndpointSerializationHelper类属于org.apache.cassandra.net包,在下文中一共展示了CompactEndpointSerializationHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public GossipDigestAck deserialize(DataInput dis, int version) throws IOException
{
    List<GossipDigest> gDigestList = GossipDigestSerializationHelper.deserialize(dis, version);
    if (version < MessagingService.VERSION_12)
        dis.readBoolean(); // 0.6 compatibility
    int size = dis.readInt();
    Map<InetAddress, EndpointState> epStateMap = new HashMap<InetAddress, EndpointState>(size);

    for (int i = 0; i < size; ++i)
    {
        InetAddress ep = CompactEndpointSerializationHelper.deserialize(dis);
        EndpointState epState = EndpointState.serializer.deserialize(dis, version);
        epStateMap.put(ep, epState);
    }
    return new GossipDigestAck(gDigestList, epStateMap);
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:17,代码来源:GossipDigestAck.java


示例2: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(StreamRequest srm, DataOutput dos, int version) throws IOException
{
    UUIDSerializer.serializer.serialize(srm.sessionId, dos, MessagingService.current_version);
    CompactEndpointSerializationHelper.serialize(srm.target, dos);
    if (srm.file != null)
    {
        dos.writeBoolean(true);
        PendingFile.serializer.serialize(srm.file, dos, version);
    }
    else
    {
        dos.writeBoolean(false);
        dos.writeUTF(srm.table);
        dos.writeInt(srm.ranges.size());
        for (Range<Token> range : srm.ranges)
            AbstractBounds.serializer.serialize(range, dos, version);

        dos.writeUTF(srm.type.name());

        dos.writeInt(Iterables.size(srm.columnFamilies));
        for (ColumnFamilyStore cfs : srm.columnFamilies)
            ColumnFamily.serializer.serializeCfId(cfs.metadata.cfId, dos, version);
    }
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:25,代码来源:StreamRequest.java


示例3: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(StreamRequest sr, int version)
{
    long size = TypeSizes.NATIVE.sizeof(sr.sessionId);
    size += CompactEndpointSerializationHelper.serializedSize(sr.target);
    size += TypeSizes.NATIVE.sizeof(true);
    if (sr.file != null)
        return size + PendingFile.serializer.serializedSize(sr.file, version);

    size += TypeSizes.NATIVE.sizeof(sr.table);
    size += TypeSizes.NATIVE.sizeof(sr.ranges.size());
    for (Range<Token> range : sr.ranges)
        size += AbstractBounds.serializer.serializedSize(range, version);
    size += TypeSizes.NATIVE.sizeof(sr.type.name());
    size += TypeSizes.NATIVE.sizeof(Iterables.size(sr.columnFamilies));
    for (ColumnFamilyStore cfs : sr.columnFamilies)
        size += ColumnFamily.serializer.cfIdSerializedSize(cfs.metadata.cfId, TypeSizes.NATIVE, version);
    return size;
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:19,代码来源:StreamRequest.java


示例4: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public GossipDigest deserialize(DataInput in, int version) throws IOException
{
    InetAddress endpoint = CompactEndpointSerializationHelper.deserialize(in);
    int generation = in.readInt();
    int maxVersion = in.readInt();
    return new GossipDigest(endpoint, generation, maxVersion);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:8,代码来源:GossipDigest.java


示例5: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(GossipDigest gDigest, int version)
{
    long size = CompactEndpointSerializationHelper.serializedSize(gDigest.endpoint);
    size += TypeSizes.NATIVE.sizeof(gDigest.generation);
    size += TypeSizes.NATIVE.sizeof(gDigest.maxVersion);
    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:8,代码来源:GossipDigest.java


示例6: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(GossipDigestAck2 ack2, DataOutputPlus out, int version) throws IOException
{
    out.writeInt(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:GossipDigestAck2.java


示例7: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public GossipDigestAck2 deserialize(DataInput in, int version) throws IOException
{
    int size = in.readInt();
    Map<InetAddress, EndpointState> epStateMap = new HashMap<InetAddress, EndpointState>(size);

    for (int i = 0; i < size; ++i)
    {
        InetAddress ep = CompactEndpointSerializationHelper.deserialize(in);
        EndpointState epState = EndpointState.serializer.deserialize(in, version);
        epStateMap.put(ep, epState);
    }
    return new GossipDigestAck2(epStateMap);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:14,代码来源:GossipDigestAck2.java


示例8: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(GossipDigestAck2 ack2, int version)
{
    long size = TypeSizes.NATIVE.sizeof(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
        size += CompactEndpointSerializationHelper.serializedSize(entry.getKey())
                + EndpointState.serializer.serializedSize(entry.getValue(), version);
    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:9,代码来源:GossipDigestAck2.java


示例9: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(GossipDigestAck gDigestAckMessage, DataOutputPlus out, int version) throws IOException
{
    GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, out, version);
    out.writeInt(gDigestAckMessage.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:GossipDigestAck.java


示例10: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public GossipDigestAck deserialize(DataInput in, int version) throws IOException
{
    List<GossipDigest> gDigestList = GossipDigestSerializationHelper.deserialize(in, version);
    int size = in.readInt();
    Map<InetAddress, EndpointState> epStateMap = new HashMap<InetAddress, EndpointState>(size);

    for (int i = 0; i < size; ++i)
    {
        InetAddress ep = CompactEndpointSerializationHelper.deserialize(in);
        EndpointState epState = EndpointState.serializer.deserialize(in, version);
        epStateMap.put(ep, epState);
    }
    return new GossipDigestAck(gDigestList, epStateMap);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:GossipDigestAck.java


示例11: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(GossipDigestAck ack, int version)
{
    int size = GossipDigestSerializationHelper.serializedSize(ack.gDigestList, version);
    size += TypeSizes.NATIVE.sizeof(ack.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack.epStateMap.entrySet())
        size += CompactEndpointSerializationHelper.serializedSize(entry.getKey())
                + EndpointState.serializer.serializedSize(entry.getValue(), version);
    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:GossipDigestAck.java


示例12: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(SyncRequest message, DataOutputPlus out, int version) throws IOException
{
    RepairJobDesc.serializer.serialize(message.desc, out, version);
    CompactEndpointSerializationHelper.serialize(message.initiator, out);
    CompactEndpointSerializationHelper.serialize(message.src, out);
    CompactEndpointSerializationHelper.serialize(message.dst, out);
    out.writeInt(message.ranges.size());
    for (Range<Token> range : message.ranges)
        AbstractBounds.serializer.serialize(range, out, version);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:SyncRequest.java


示例13: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public SyncRequest deserialize(DataInput in, int version) throws IOException
{
    RepairJobDesc desc = RepairJobDesc.serializer.deserialize(in, version);
    InetAddress owner = CompactEndpointSerializationHelper.deserialize(in);
    InetAddress src = CompactEndpointSerializationHelper.deserialize(in);
    InetAddress dst = CompactEndpointSerializationHelper.deserialize(in);
    int rangesCount = in.readInt();
    List<Range<Token>> ranges = new ArrayList<>(rangesCount);
    for (int i = 0; i < rangesCount; ++i)
        ranges.add((Range<Token>) AbstractBounds.serializer.deserialize(in, version).toTokenBounds());
    return new SyncRequest(desc, owner, src, dst, ranges);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:13,代码来源:SyncRequest.java


示例14: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(SyncRequest message, int version)
{
    long size = RepairJobDesc.serializer.serializedSize(message.desc, version);
    size += 3 * CompactEndpointSerializationHelper.serializedSize(message.initiator);
    size += TypeSizes.NATIVE.sizeof(message.ranges.size());
    for (Range<Token> range : message.ranges)
        size += AbstractBounds.serializer.serializedSize(range, version);
    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:SyncRequest.java


示例15: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(StreamInitMessage message, DataOutputPlus out, int version) throws IOException
{
    CompactEndpointSerializationHelper.serialize(message.from, out);
    out.writeInt(message.sessionIndex);
    UUIDSerializer.serializer.serialize(message.planId, out, MessagingService.current_version);
    out.writeUTF(message.description);
    out.writeBoolean(message.isForOutgoing);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:9,代码来源:StreamInitMessage.java


示例16: deserialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public StreamInitMessage deserialize(DataInput in, int version) throws IOException
{
    InetAddress from = CompactEndpointSerializationHelper.deserialize(in);
    int sessionIndex = in.readInt();
    UUID planId = UUIDSerializer.serializer.deserialize(in, MessagingService.current_version);
    String description = in.readUTF();
    boolean sentByInitiator = in.readBoolean();
    return new StreamInitMessage(from, sessionIndex, planId, description, sentByInitiator);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:StreamInitMessage.java


示例17: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public long serializedSize(StreamInitMessage message, int version)
{
    long size = CompactEndpointSerializationHelper.serializedSize(message.from);
    size += TypeSizes.NATIVE.sizeof(message.sessionIndex);
    size += UUIDSerializer.serializer.serializedSize(message.planId, MessagingService.current_version);
    size += TypeSizes.NATIVE.sizeof(message.description);
    size += TypeSizes.NATIVE.sizeof(message.isForOutgoing);
    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:StreamInitMessage.java


示例18: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(GossipDigestAck2 ack2, DataOutput out, int version) throws IOException
{
    out.writeInt(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:11,代码来源:GossipDigestAck2.java


示例19: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(GossipDigestAck gDigestAckMessage, DataOutput out, int version) throws IOException
{
    GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, out, version);
    out.writeInt(gDigestAckMessage.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:12,代码来源:GossipDigestAck.java


示例20: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入依赖的package包/类
public void serialize(SyncRequest message, DataOutput out, int version) throws IOException
{
    RepairJobDesc.serializer.serialize(message.desc, out, version);
    CompactEndpointSerializationHelper.serialize(message.initiator, out);
    CompactEndpointSerializationHelper.serialize(message.src, out);
    CompactEndpointSerializationHelper.serialize(message.dst, out);
    out.writeInt(message.ranges.size());
    for (Range<Token> range : message.ranges)
        AbstractBounds.serializer.serialize(range, out, version);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:11,代码来源:SyncRequest.java



注:本文中的org.apache.cassandra.net.CompactEndpointSerializationHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Effect类代码示例发布时间:2022-05-22
下一篇:
Java RunAsWork类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap