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


Java CBUtil.sizeOfValueList方法代码示例

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


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

示例1: encodedSize

import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(QueryOptions options, ProtocolVersion version)
{
    int size = 0;

    size += CBUtil.sizeOfConsistencyLevel(options.getConsistency());

    EnumSet<Flag> flags = gatherFlags(options);
    size += (version.isGreaterOrEqualTo(ProtocolVersion.V5) ? 4 : 1);

    if (flags.contains(Flag.VALUES))
        size += CBUtil.sizeOfValueList(options.getValues());
    if (flags.contains(Flag.PAGE_SIZE))
        size += 4;
    if (flags.contains(Flag.PAGING_STATE))
        size += CBUtil.sizeOfValue(options.getPagingState().serializedSize(version));
    if (flags.contains(Flag.SERIAL_CONSISTENCY))
        size += CBUtil.sizeOfConsistencyLevel(options.getSerialConsistency());
    if (flags.contains(Flag.TIMESTAMP))
        size += 8;

    return size;
}
 
开发者ID:Netflix,项目名称:sstable-adaptor,代码行数:23,代码来源:QueryOptions.java

示例2: encodedSize

import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(QueryOptions options, int version)
{
    int size = 0;

    size += CBUtil.sizeOfConsistencyLevel(options.getConsistency());

    EnumSet<Flag> flags = gatherFlags(options);
    size += 1;

    if (flags.contains(Flag.VALUES))
        size += CBUtil.sizeOfValueList(options.getValues());
    if (flags.contains(Flag.PAGE_SIZE))
        size += 4;
    if (flags.contains(Flag.PAGING_STATE))
        size += CBUtil.sizeOfValue(options.getPagingState().serialize());
    if (flags.contains(Flag.SERIAL_CONSISTENCY))
        size += CBUtil.sizeOfConsistencyLevel(options.getSerialConsistency());
    if (flags.contains(Flag.TIMESTAMP))
        size += 8;

    return size;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:23,代码来源:QueryOptions.java

示例3: encodedSize

import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(QueryOptions options, int version)
{
    int size = 0;

    size += CBUtil.sizeOfConsistencyLevel(options.getConsistency());

    EnumSet<Flag> flags = gatherFlags(options);
    size += 1;

    if (flags.contains(Flag.VALUES))
        size += CBUtil.sizeOfValueList(options.getValues());
    if (flags.contains(Flag.PAGE_SIZE))
        size += 4;
    if (flags.contains(Flag.PAGING_STATE))
        size += CBUtil.sizeOfValue(options.getPagingState().serialize());
    if (flags.contains(Flag.SERIAL_CONSISTENCY))
        size += CBUtil.sizeOfConsistencyLevel(options.getSerialConsistency());

    return size;
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:21,代码来源:QueryOptions.java

示例4: encodedSize

import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(QueryOptions options, int version)
{
    int size = 0;

    size += CBUtil.sizeOfConsistencyLevel(options.getConsistency());

    EnumSet<Flag> flags = gatherFlags(options);
    size += 1;

    if (flags.contains(Flag.VALUES))
        size += CBUtil.sizeOfValueList(options.getValues());
    if (flags.contains(Flag.PAGE_SIZE))
        size += 4;
    if (flags.contains(Flag.PAGING_STATE))
        size += CBUtil.sizeOfValue(options.getPagingState().serializedSize(version));
    if (flags.contains(Flag.SERIAL_CONSISTENCY))
        size += CBUtil.sizeOfConsistencyLevel(options.getSerialConsistency());
    if (flags.contains(Flag.TIMESTAMP))
        size += 8;

    return size;
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:23,代码来源:QueryOptions.java


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