Closed SajithaN closed 6 years ago
I am thinking about write consistency levels: https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html#dmlConfigConsistency__dml-config-write-consistency
It can be set on PreparedStatement object.
`PreparedStatement setConsistencyLevel(ConsistencyLevel consistency) Sets a default consistency level for all bound statements created from this prepared statement. If no consistency level is set through this method, the bound statement created from this object will use the default consistency level (ONE).
Changing the default consistency level is not retroactive, it only applies to BoundStatement created after the change.
Parameters: consistency - the default consistency level to set. Returns: this PreparedStatement object.`
It can also be on Batch level:
val batch = new BatchStatement(batchType); batch.setConsistencyLevel(consistencyLevel)
ah I understand. I'll look into this
insert statements already allow TTL. write like
could you clarify what you mean by consistency level? I don't see that in the docs