@Test public void testComplete() { AsyncUpdateGroup group = new AsyncUpdateGroup(getSession(), Executors.newSingleThreadExecutor()); getSession().execute(SchemaBuilder.createTable("foo").addPartitionKey("bar", DataType.varchar())); group.addUpdate(QueryBuilder.insertInto("foo").value("bar", "baz")); group.complete(); assertEquals(1, getSession().execute("select bar from foo where bar = ?", "baz").all().size()); }
@Override public void complete() { try { Uninterruptibles.getUninterruptibly(Futures.allAsList(futures)); } catch (ExecutionException e) { throw new HecateException(e, "An unknown exception occurred while executing query."); } }
AsyncUpdateGroup implements UpdateGroup { @Override public void complete() { try { Uninterruptibles.getUninterruptibly(Futures.allAsList(futures)); } catch (ExecutionException e) { throw new HecateException(e, "An unknown exception occurred while executing query."); } } }
AsyncUpdateGroup implements UpdateGroup { @Override public void complete() { try { Uninterruptibles.getUninterruptibly(Futures.allAsList(futures)); } catch (ExecutionException e) { throw new HecateException(e, "An unknown exception occurred while executing query."); } } AsyncUpdateGroup(Session session, Executor executor); }
AsyncUpdateGroup implements UpdateGroup { @Override public void complete() { try { Uninterruptibles.getUninterruptibly(Futures.allAsList(futures)); } catch (ExecutionException e) { throw new HecateException(e, "An unknown exception occurred while executing query."); } } AsyncUpdateGroup(Session session, Executor executor); @Override void addUpdate(Statement statement); @Override void complete(); @Override ListenableFuture<Void> completeAsync(); }
AsyncUpdateGroup implements UpdateGroup { @Override public void complete() { try { Uninterruptibles.getUninterruptibly(Futures.allAsList(futures)); } catch (ExecutionException e) { throw new HecateException(e, "An unknown exception occurred while executing query."); } } AsyncUpdateGroup(Session session, Executor executor); @Override void addUpdate(Statement statement); @Override void complete(); @Override ListenableFuture<Void> completeAsync();  }