本文整理汇总了Java中org.apache.cassandra.cql3.statements.BatchStatement.Type方法的典型用法代码示例。如果您正苦于以下问题:Java BatchStatement.Type方法的具体用法?Java BatchStatement.Type怎么用?Java BatchStatement.Type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.cql3.statements.BatchStatement
的用法示例。
在下文中一共展示了BatchStatement.Type方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toType
import org.apache.cassandra.cql3.statements.BatchStatement; //导入方法依赖的package包/类
private BatchStatement.Type toType(byte b)
{
if (b == 0)
return BatchStatement.Type.LOGGED;
else if (b == 1)
return BatchStatement.Type.UNLOGGED;
else if (b == 2)
return BatchStatement.Type.COUNTER;
else
throw new ProtocolException("Invalid BATCH message type " + b);
}
示例2: fromType
import org.apache.cassandra.cql3.statements.BatchStatement; //导入方法依赖的package包/类
private byte fromType(BatchStatement.Type type)
{
switch (type)
{
case LOGGED: return 0;
case UNLOGGED: return 1;
case COUNTER: return 2;
default:
throw new AssertionError();
}
}
示例3: BatchMessage
import org.apache.cassandra.cql3.statements.BatchStatement; //导入方法依赖的package包/类
public BatchMessage(BatchStatement.Type type, List<Object> queryOrIdList, List<List<ByteBuffer>> values, QueryOptions options)
{
super(Message.Type.BATCH);
this.type = type;
this.queryOrIdList = queryOrIdList;
this.values = values;
this.options = options;
}
示例4: BatchMessage
import org.apache.cassandra.cql3.statements.BatchStatement; //导入方法依赖的package包/类
public BatchMessage(BatchStatement.Type type, List<Object> queryOrIdList, List<List<ByteBuffer>> values, ConsistencyLevel consistency)
{
super(Message.Type.BATCH);
this.type = type;
this.queryOrIdList = queryOrIdList;
this.values = values;
this.consistency = consistency;
}
示例5: BatchMessage
import org.apache.cassandra.cql3.statements.BatchStatement; //导入方法依赖的package包/类
public BatchMessage(BatchStatement.Type type, List<Object> queryOrIdList, List<List<ByteBuffer>> values, QueryOptions options)
{
super(Message.Type.BATCH);
this.batchType = type;
this.queryOrIdList = queryOrIdList;
this.values = values;
this.options = options;
}