本文整理汇总了Java中org.apache.cassandra.net.MessagingService.validatePartitioner方法的典型用法代码示例。如果您正苦于以下问题:Java MessagingService.validatePartitioner方法的具体用法?Java MessagingService.validatePartitioner怎么用?Java MessagingService.validatePartitioner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.net.MessagingService
的用法示例。
在下文中一共展示了MessagingService.validatePartitioner方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serialize
import org.apache.cassandra.net.MessagingService; //导入方法依赖的package包/类
public void serialize(RepairJobDesc desc, DataOutputPlus out, int version) throws IOException
{
if (version >= MessagingService.VERSION_21)
{
out.writeBoolean(desc.parentSessionId != null);
if (desc.parentSessionId != null)
UUIDSerializer.serializer.serialize(desc.parentSessionId, out, version);
}
UUIDSerializer.serializer.serialize(desc.sessionId, out, version);
out.writeUTF(desc.keyspace);
out.writeUTF(desc.columnFamily);
MessagingService.validatePartitioner(desc.ranges);
out.writeInt(desc.ranges.size());
for (Range<Token> rt : desc.ranges)
AbstractBounds.tokenSerializer.serialize(rt, out, version);
}
示例2: serialize
import org.apache.cassandra.net.MessagingService; //导入方法依赖的package包/类
public void serialize(PrepareMessage message, DataOutputPlus out, int version) throws IOException
{
out.writeInt(message.cfIds.size());
for (UUID cfId : message.cfIds)
UUIDSerializer.serializer.serialize(cfId, out, version);
UUIDSerializer.serializer.serialize(message.parentRepairSession, out, version);
out.writeInt(message.ranges.size());
for (Range<Token> r : message.ranges)
{
MessagingService.validatePartitioner(r);
Range.tokenSerializer.serialize(r, out, version);
}
out.writeBoolean(message.isIncremental);
out.writeLong(message.timestamp);
out.writeBoolean(message.isGlobal);
}
示例3: serialize
import org.apache.cassandra.net.MessagingService; //导入方法依赖的package包/类
public void serialize(AnticompactionRequest message, DataOutputPlus out, int version) throws IOException
{
UUIDSerializer.serializer.serialize(message.parentRepairSession, out, version);
out.writeInt(message.successfulRanges.size());
for (Range<Token> r : message.successfulRanges)
{
MessagingService.validatePartitioner(r);
Range.tokenSerializer.serialize(r, out, version);
}
}
示例4: serialize
import org.apache.cassandra.net.MessagingService; //导入方法依赖的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)
{
MessagingService.validatePartitioner(range);
AbstractBounds.tokenSerializer.serialize(range, out, version);
}
}
示例5: serialize
import org.apache.cassandra.net.MessagingService; //导入方法依赖的package包/类
public void serialize(StreamRequest request, DataOutputPlus out, int version) throws IOException
{
out.writeUTF(request.keyspace);
out.writeLong(request.repairedAt);
out.writeInt(request.ranges.size());
for (Range<Token> range : request.ranges)
{
MessagingService.validatePartitioner(range);
Token.serializer.serialize(range.left, out, version);
Token.serializer.serialize(range.right, out, version);
}
out.writeInt(request.columnFamilies.size());
for (String cf : request.columnFamilies)
out.writeUTF(cf);
}