How do I set consisency level?

976 views
Skip to first unread message

Jens Rantil

unread,
Jul 17, 2014, 4:04:25 PM7/17/14
to spring-dat...@googlegroups.com
Hi,

Is there any way for me to set consistency levels for repository methods without writing a full implementation myself? Also, can I set default read/write consistency level for all read/write operations on a repository or a SessionBuilder? What is the default read/consistency by the way?

Thanks,
Jens

Jens Rantil

unread,
Jul 29, 2014, 7:12:16 AM7/29/14
to spring-dat...@googlegroups.com
Hi again,

Ping. Anyone who could assist me? I especially would like to know what default read/write consistency spring-data-cassandra is using and possibly how I can adjust that.

Thank you,
Jens

Matthew Adams

unread,
Jul 29, 2014, 11:01:48 AM7/29/14
to spring-dat...@googlegroups.com
Hi Jens,

Currently, all custom repository methods boil down to those found in SimpleCassandraRepository, which delegate to a CassandraOperations instance.  I looked, and the repository methods (CassandraQueryMethod) don't yet support accepting a per-method QueryOptions or WriteOptions argument, nor does the @Query annotation, although the underlying CqlOperations methods do.  There is also no way to define per-repository-type or per-repository-instance default consistency levels, or per-template-type or per-template-instance default consistency levels, so this looks like an enhancement request.

Please enter two issues for this:  first, request support for a default QueryOptions & WriteOptions on CqlTemplate & SimpleCassandraRepository, then request that repository methods be enhanced to accept QueryOptions and/or WriteOptions as arguments to override the repository's default QueryOptions & WriteOptions.

Sorry for the delay in responding.

-matthew
Reply all
Reply to author
Forward
0 new messages