You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sha Liu <li...@hotmail.com> on 2015/04/07 01:46:40 UTC

Data stax object mapping and lightweight transactions

Hi,

Does the latest Data Stax Java driver (2.1.5) support lightweight transactions using object mapping? For example, if I set the write consistency level of the mapped class to SERIAL through annotation, then does the “save” operation use lightweight transaction instead of a normal write?

Thanks,
Sha Liu

Re: Data stax object mapping and lightweight transactions

Posted by Sylvain Lebresne <sy...@datastax.com>.
This is very much a Java Driver question so please try to use the java
driver mailing list (
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user)
for this type of question instead of the general Cassandra mailing list in
the future.

That said, to answer you question, no, the "save" operation will not use
lightweight transaction. If you want to use LWT with the driver mapping,
you should look at the "accessors" (
http://docs.datastax.com/en/developer/java-driver/2.1/common/drivers/reference/accessorAnnotatedInterfaces.html
).

On Tue, Apr 7, 2015 at 1:46 AM, Sha Liu <li...@hotmail.com> wrote:

> Hi,
>
> Does the latest Data Stax Java driver (2.1.5) support lightweight
> transactions using object mapping? For example, if I set the write
> consistency level of the mapped class to SERIAL through annotation, then
> does the “save” operation use lightweight transaction instead of a normal
> write?
>
> Thanks,
> Sha Liu