Cassandra - Is there a way to limit number of async queries?
问题 I would like to know if there is way to limit the number of queries executed simultaneously by the cassandra java driver ? Currently, I execute a lot of queries as follows : ... PreparedStatement stmt = session.prepare("SELECT * FROM users WHERE id = ?"); BoundStatement boundStatement = new BoundStatement(stmt); List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length); for(String id : list ) { futures.add(session.executeAsync(boundStatement.bind(id))); } for