Technology•October 13, 2014
New in Java driver 2.1.2: native protocol v3 support

Cluster.builder().addContactPoint("127.0.0.1")
.withProtocolVersion(ProtocolVersion.V2)
.build();
String text = (String) DataType.deserialize(buffer, ProtocolVersion.V3);
Cluster.builder().addContactPoint("127.0.0.1")
.withPoolingOptions(new PoolingOptions()
.setMaxSimultaneousRequestsPerHostThreshold(HostDistance.LOCAL, 16384)
.setMaxSimultaneousRequestsPerHostThreshold(HostDistance.REMOTE, 2048))
.build();
Cluster.builder().addContactPoint("127.0.0.1")
.withTimestampGenerator(new AtomicMonotonicTimestampGenerator())
.build();
Statement statement = new SimpleStatement("UPDATE users SET email = 'x@y.com' where id = 1");
statement.setDefaultTimestamp(1234567890);
session.execute(statement);
BatchStatement batch = new BatchStatement();
batch.add(new SimpleStatement("UPDATE bills SET balance=-200 WHERE user='user1' IF balance=-208"));
batch.add(new SimpleStatement("UPDATE bills SET paid=true"
+ "WHERE user='user1' AND expense_id=1"
+ "IF paid=false"));
batch.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL);
session.execute(batch);