SPARK-2636: add java API for async actions