private void mutate(List<org.apache.cassandra.db.Mutation> cmds, org.apache.cassandra.db.ConsistencyLevel clvl) throws BackendException { try { schedule(DatabaseDescriptor.getRpcTimeout()); try { if (atomicBatch) { StorageProxy.mutateAtomically(cmds, clvl); } else { StorageProxy.mutate(cmds, clvl); } } catch (RequestExecutionException e) { throw new TemporaryBackendException(e); } finally { release(); } } catch (TimeoutException ex) { log.debug("Cassandra TimeoutException", ex); throw new TemporaryBackendException(ex); } }
@SuppressWarnings("unchecked") public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically) throws WriteTimeoutException, UnavailableException, OverloadedException, InvalidRequestException { Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations); if (augmented != null) mutateAtomically(augmented, consistencyLevel); else if (mutateAtomically) mutateAtomically((Collection<Mutation>) mutations, consistencyLevel); else mutate(mutations, consistencyLevel); }
@SuppressWarnings("unchecked") public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically, long queryStartNanoTime) throws WriteTimeoutException, WriteFailureException, UnavailableException, OverloadedException, InvalidRequestException { Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations); boolean updatesView = Keyspace.open(mutations.iterator().next().getKeyspaceName()) .viewManager .updatesAffectView(mutations, true); if (augmented != null) mutateAtomically(augmented, consistencyLevel, updatesView, queryStartNanoTime); else { if (mutateAtomically || updatesView) mutateAtomically((Collection<Mutation>) mutations, consistencyLevel, updatesView, queryStartNanoTime); else mutate(mutations, consistencyLevel, queryStartNanoTime); } }
@SuppressWarnings("unchecked") public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically, long queryStartNanoTime) throws WriteTimeoutException, WriteFailureException, UnavailableException, OverloadedException, InvalidRequestException { Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations); boolean updatesView = Keyspace.open(mutations.iterator().next().getKeyspaceName()) .viewManager .updatesAffectView(mutations, true); if (augmented != null) mutateAtomically(augmented, consistencyLevel, updatesView, queryStartNanoTime); else { if (mutateAtomically || updatesView) mutateAtomically((Collection<Mutation>) mutations, consistencyLevel, updatesView, queryStartNanoTime); else mutate(mutations, consistencyLevel, queryStartNanoTime); } }
@SuppressWarnings("unchecked") public static void mutateWithTriggers(Collection<? extends IMutation> mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically, long queryStartNanoTime) throws WriteTimeoutException, WriteFailureException, UnavailableException, OverloadedException, InvalidRequestException { Collection<Mutation> augmented = TriggerExecutor.instance.execute(mutations); boolean updatesView = Keyspace.open(mutations.iterator().next().getKeyspaceName()) .viewManager .updatesAffectView(mutations, true); if (augmented != null) mutateAtomically(augmented, consistencyLevel, updatesView, queryStartNanoTime); else { if (mutateAtomically || updatesView) mutateAtomically((Collection<Mutation>) mutations, consistencyLevel, updatesView, queryStartNanoTime); else mutate(mutations, consistencyLevel, queryStartNanoTime); } }
private void mutate(List<org.apache.cassandra.db.Mutation> cmds, org.apache.cassandra.db.ConsistencyLevel clvl) throws BackendException { try { schedule(DatabaseDescriptor.getRpcTimeout()); try { if (atomicBatch) { StorageProxy.mutateAtomically(cmds, clvl); } else { StorageProxy.mutate(cmds, clvl); } } catch (RequestExecutionException e) { throw new TemporaryBackendException(e); } finally { release(); } } catch (TimeoutException ex) { log.debug("Cassandra TimeoutException", ex); throw new TemporaryBackendException(ex); } }
private void mutate(List<RowMutation> cmds, org.apache.cassandra.db.ConsistencyLevel clvl) throws BackendException { try { schedule(DatabaseDescriptor.getRpcTimeout()); try { if (atomicBatch) { StorageProxy.mutateAtomically(cmds, clvl); } else { StorageProxy.mutate(cmds, clvl); } } catch (RequestExecutionException e) { throw new TemporaryBackendException(e); } finally { release(); } } catch (TimeoutException ex) { log.debug("Cassandra TimeoutException", ex); throw new TemporaryBackendException(ex); } }