private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options) throws RequestExecutionException, RequestValidationException { ConsistencyLevel cl = options.getConsistency(); if (isCounter()) cl.validateCounterForWrite(cfm); else cl.validateForWrite(cfm.ksName); Collection<? extends IMutation> mutations = getMutations(options, false, options.getTimestamp(queryState)); if (!mutations.isEmpty()) StorageProxy.mutateWithTriggers(mutations, cl, false); return null; }
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { ConsistencyLevel cl = options.getConsistency(); if (isCounter()) cl.validateCounterForWrite(cfm); else cl.validateForWrite(cfm.ksName); Collection<? extends IMutation> mutations = getMutations(options, false, options.getTimestamp(queryState), queryStartNanoTime); if (!mutations.isEmpty()) StorageProxy.mutateWithTriggers(mutations, cl, false, queryStartNanoTime); return null; }
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { ConsistencyLevel cl = options.getConsistency(); if (isCounter()) cl.validateCounterForWrite(cfm); else cl.validateForWrite(cfm.ksName); Collection<? extends IMutation> mutations = getMutations(options, false, options.getTimestamp(queryState), queryStartNanoTime); if (!mutations.isEmpty()) StorageProxy.mutateWithTriggers(mutations, cl, false, queryStartNanoTime); return null; }
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { ConsistencyLevel cl = options.getConsistency(); if (isCounter()) cl.validateCounterForWrite(cfm); else cl.validateForWrite(cfm.ksName); Collection<? extends IMutation> mutations = getMutations(options, false, options.getTimestamp(queryState), queryStartNanoTime); if (!mutations.isEmpty()) StorageProxy.mutateWithTriggers(mutations, cl, false, queryStartNanoTime); return null; }
private void doInsert(ConsistencyLevel consistency_level, List<? extends IMutation> mutations, boolean mutateAtomically, long queryStartNanoTime) throws UnavailableException, TimedOutException, org.apache.cassandra.exceptions.InvalidRequestException { org.apache.cassandra.db.ConsistencyLevel consistencyLevel = ThriftConversion.fromThrift(consistency_level); consistencyLevel.validateForWrite(state().getKeyspace()); if (mutations.isEmpty()) return; long timeout = Long.MAX_VALUE; for (IMutation m : mutations) timeout = Longs.min(timeout, m.getTimeout()); schedule(timeout); try { StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically, queryStartNanoTime); } catch (RequestExecutionException e) { ThriftConversion.rethrow(e); } finally { release(); } }
private void doInsert(ConsistencyLevel consistency_level, List<? extends IMutation> mutations, boolean mutateAtomically, long queryStartNanoTime) throws UnavailableException, TimedOutException, org.apache.cassandra.exceptions.InvalidRequestException { org.apache.cassandra.db.ConsistencyLevel consistencyLevel = ThriftConversion.fromThrift(consistency_level); consistencyLevel.validateForWrite(state().getKeyspace()); if (mutations.isEmpty()) return; long timeout = Long.MAX_VALUE; for (IMutation m : mutations) timeout = Longs.min(timeout, m.getTimeout()); schedule(timeout); try { StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically, queryStartNanoTime); } catch (RequestExecutionException e) { ThriftConversion.rethrow(e); } finally { release(); } }
private void doInsert(ConsistencyLevel consistency_level, List<? extends IMutation> mutations, boolean mutateAtomically) throws UnavailableException, TimedOutException, org.apache.cassandra.exceptions.InvalidRequestException { org.apache.cassandra.db.ConsistencyLevel consistencyLevel = ThriftConversion.fromThrift(consistency_level); consistencyLevel.validateForWrite(state().getKeyspace()); if (mutations.isEmpty()) return; long timeout = Long.MAX_VALUE; for (IMutation m : mutations) timeout = Longs.min(timeout, m.getTimeout()); schedule(timeout); try { StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically); } catch (RequestExecutionException e) { ThriftConversion.rethrow(e); } finally { release(); } }
case UPDATE: UpdateStatement update = (UpdateStatement)statement.statement; update.getConsistencyLevel().validateForWrite(keyspace); batch.getConsistencyLevel().validateForWrite(keyspace);