Cassandra在datastax驱动程序中准备了批处理语句

Cassandra在datastax驱动程序中准备了批处理语句,cassandra,cql,Cassandra,Cql,我在Datastax java驱动程序中使用了下面的批处理preparedstatement代码 PreparedStatement ps = session.prepare("INSERT INTO messages (user_id, msg_id, title, body) VALUES (?, ?, ?, ?)"); BatchStatement b

我在Datastax java驱动程序中使用了下面的批处理preparedstatement代码

PreparedStatement ps = session.prepare("INSERT INTO messages (user_id,                                                                      
msg_id, title, body) VALUES (?, ?, ?, ?)");
BatchStatement batch = new BatchStatement();
batch.add(ps.bind(uid, mid1, title1, body1));
batch.add(ps.bind(uid, mid2, title2, body2));
batch.add(ps.bind(uid, mid3, title3, body3));
session.execute(batch);

此BatchStatement是记录的还是未记录的?

如果没有参数,BatchStatement()将创建一个记录的批

或者传递BatchStatement.Type=Unlocked以创建未标记的批

有关详细信息,请查看以下文档: