本文整理汇总了Java中org.apache.cassandra.transport.CBUtil.sizeOfValue方法的典型用法代码示例。如果您正苦于以下问题:Java CBUtil.sizeOfValue方法的具体用法?Java CBUtil.sizeOfValue怎么用?Java CBUtil.sizeOfValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.transport.CBUtil
的用法示例。
在下文中一共展示了CBUtil.sizeOfValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: encodedSize
import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(AuthChallenge challenge, int version)
{
return CBUtil.sizeOfValue(challenge.token);
}
示例6: encodedSize
import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(AuthResponse response, int version)
{
return CBUtil.sizeOfValue(response.token);
}
示例7: encodedSize
import org.apache.cassandra.transport.CBUtil; //导入方法依赖的package包/类
public int encodedSize(AuthSuccess success, int version)
{
return CBUtil.sizeOfValue(success.token);
}