@Test public void testCompleteAsync() throws Exception { 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.completeAsync().get(); assertEquals(1, getSession().execute("select bar from foo where bar = ?", "baz").all().size()); }
@Override public ListenableFuture<Void> completeAsync() { return Futures.transform(Futures.allAsList(futures), (Function<List<ResultSet>, Void>) list -> null, executor); }
AsyncUpdateGroup implements UpdateGroup { @Override public ListenableFuture<Void> completeAsync() { return Futures.transform(Futures.allAsList(futures), (Function<List<ResultSet>, Void>) list -> null, executor); } }
AsyncUpdateGroup implements UpdateGroup { @Override public ListenableFuture<Void> completeAsync() { return Futures.transform(Futures.allAsList(futures), (Function<List<ResultSet>, Void>) list -> null, executor); } AsyncUpdateGroup(Session session, Executor executor); }
AsyncUpdateGroup implements UpdateGroup { @Override public ListenableFuture<Void> completeAsync() { return Futures.transform(Futures.allAsList(futures), (Function<List<ResultSet>, Void>) list -> null, executor); } AsyncUpdateGroup(Session session, Executor executor); @Override void addUpdate(Statement statement); @Override void complete(); @Override ListenableFuture<Void> completeAsync(); }
AsyncUpdateGroup implements UpdateGroup { @Override public ListenableFuture<Void> completeAsync() { return Futures.transform(Futures.allAsList(futures), (Function<List<ResultSet>, Void>) list -> null, executor); } AsyncUpdateGroup(Session session, Executor executor); @Override void addUpdate(Statement statement); @Override void complete(); @Override ListenableFuture<Void> completeAsync();  }