final ListenableFuture<Iterator<Row>> futureIterator = asyncUtils.transformFuture(resultSetFuture, RESULTSET_TO_ITERATOR, executorService);
Function<Iterator<Row>, Iterator<T>> rowToIterator = new Function<Iterator<Row>, Iterator<T>>() {
@Override
public Iterator<T> apply(Iterator<Row> rowIterator) {
PersistenceContext context = buildContextForQuery(sliceQueryProperties);
return new SliceQueryIterator<>(sliceQueryProperties, context, rowIterator);
}
};
final ListenableFuture<Iterator<T>> listenableFuture = asyncUtils.transformFuture(futureIterator, rowToIterator, executorService);
asyncUtils.maybeAddAsyncListeners(listenableFuture, sliceQueryProperties.getAsyncListeners(), executorService);