throw new RuntimeException(e);
}
}
public void sendChangesImpl(List<Action> actions, MetaLookup ormSession) throws ConnectionException {
Keyspace keyspace = columnFamilies.getKeyspace();
MutationBatch m = keyspace.prepareMutationBatch();
//MutationBatch m = m1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
for(Action action : actions) {
if(action instanceof Persist) {
persist((Persist)action, ormSession, m);
} else if(action instanceof Remove) {
remove((Remove)action, ormSession, m);
} else if(action instanceof PersistIndex) {
persistIndex((PersistIndex)action, ormSession, m);
} else if(action instanceof RemoveIndex) {
removeIndex((RemoveIndex)action, ormSession, m);
} else if(action instanceof RemoveColumn) {
removeColumn((RemoveColumn) action, ormSession, m);
}
}
long time = System.currentTimeMillis();
m.execute();
if(log.isTraceEnabled()) {
long total = System.currentTimeMillis()-time;
log.trace("astyanx save took="+total+" ms");
}