package com.thinkaurelius.titan.diskstorage.cassandra;

import static com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager.CASSANDRA_READ_CONSISTENCY;
import static com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager.CASSANDRA_WRITE_CONSISTENCY;

import com.google.common.base.Preconditions;
import com.thinkaurelius.titan.diskstorage.TransactionHandleConfig;
import com.thinkaurelius.titan.diskstorage.common.AbstractStoreTransaction;
import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction;

public class CassandraTransaction extends AbstractStoreTransaction {

    public CassandraTransaction(TransactionHandleConfig c) {
        super(c);
    }

    public CLevel getReadConsistencyLevel() {
        return CLevel.parse(getConfiguration().getCustomOption(CASSANDRA_READ_CONSISTENCY));
    }

    public CLevel getWriteConsistencyLevel() {
        return CLevel.parse(getConfiguration().getCustomOption(CASSANDRA_WRITE_CONSISTENCY));
    }

    public static CassandraTransaction getTx(StoreTransaction txh) {
        Preconditions.checkArgument(txh != null);
        Preconditions.checkArgument(txh instanceof CassandraTransaction, "Unexpected transaction type %s", txh.getClass().getName());
        return (CassandraTransaction) txh;
    }
}

@@ -287,16 +287,74 @@
 TENCY;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import c
@@ -681,16 +681,108 @@
 tion %7B%0A%0A
+    private static final Logger log = LoggerFactory.getLogger(CassandraTransaction.class);%0A%0A
     publ
@@ -905,38 +905,44 @@
 vel() %7B%0A        
-return
+CLevel lev =
  CLevel.parse(ge
@@ -996,32 +996,124 @@
 _CONSISTENCY));%0A
+        log.debug(%22Read consistency level for tx %7B%7D is %7B%7D%22, this, lev);%0A        return lev;%0A
     %7D%0A%0A    publi
@@ -1158,22 +1158,28 @@
         
-return
+CLevel lev =
  CLevel.
@@ -1246,24 +1246,117 @@
 SISTENCY));%0A
+        log.debug(%22Write consistency level for tx %7B%7D is %7B%7D%22, this, lev);%0A        return lev;%0A
     %7D%0A%0A    p

Add DEBUG logging of Cassandra consistency levels