当前位置: 首页>>代码示例>>Java>>正文


Java CompactEndpointSerializationHelper.serializedSize方法代码示例

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


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

示例1: 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:jackliu8722,项目名称:cassandra-1.2.16,代码行数:19,代码来源:StreamRequest.java

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: serializedSize

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

示例8: serializedSize

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

示例9: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public long serializedSize(GossipDigestAck2 ack2, int version)
{
    long size = TypeSizes.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:scylladb,项目名称:scylla-tools-java,代码行数:9,代码来源:GossipDigestAck2.java

示例10: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public long serializedSize(GossipDigestAck ack, int version)
{
    int size = GossipDigestSerializationHelper.serializedSize(ack.gDigestList, version);
    size += TypeSizes.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:scylladb,项目名称:scylla-tools-java,代码行数:10,代码来源:GossipDigestAck.java

示例11: 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.sizeof(message.ranges.size());
    for (Range<Token> range : message.ranges)
        size += AbstractBounds.tokenSerializer.serializedSize(range, version);
    return size;
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:10,代码来源:SyncRequest.java

示例12: serializedSize

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

示例13: 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:dprguiuc,项目名称:Cassandra-Wasef,代码行数:9,代码来源:GossipDigestAck2.java

示例14: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public long serializedSize(GossipDigestAck ack, int version)
{
    int size = GossipDigestSerializationHelper.serializedSize(ack.gDigestList, version);
    if (version < MessagingService.VERSION_12)
        size += TypeSizes.NATIVE.sizeof(true);
    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:jackliu8722,项目名称:cassandra-1.2.16,代码行数:12,代码来源:GossipDigestAck.java

示例15: serializedSize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public long serializedSize(StreamingRepairTask task, int version)
{
    long size = UUIDSerializer.serializer.serializedSize(task.id, version);
    size += 3 * CompactEndpointSerializationHelper.serializedSize(task.owner);
    size += TypeSizes.NATIVE.sizeof(task.tableName);
    size += TypeSizes.NATIVE.sizeof(task.cfName);
    size += TypeSizes.NATIVE.sizeof(task.ranges.size());
    for (Range<Token> range : task.ranges)
        size += AbstractBounds.serializer.serializedSize(range, version);
    return size;
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:12,代码来源:StreamingRepairTask.java


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