# Application wait on Async client

**URL:** <https://discuss.aerospike.com/t/application-wait-on-async-client/3633>\
**Category:** Java Client\
**Created:** [November 26, 2016, 8:09pm UTC](https://discuss.aerospike.com/t/application-wait-on-async-client/3633 "2016-11-26T20:09:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kshitij](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@Kshitij](https://discuss.aerospike.com/u/Kshitij)\
**Post date:** [November 26, 2016, 8:09pm UTC](https://discuss.aerospike.com/t/application-wait-on-async-client/3633/1 "2016-11-26T20:09:25Z")

</div>

I am planning on using async client to handle our reads and writes asynchronously. So far in the documents and examples, I found that we need to set up callbacks using RecordListener and WriteListener. However, in case of reads, I want to use the record later on in the application. So, if I reach that point in the application before the read is complete, I want to wait for the records to be fetched until the timeout. I haven’t been able to find any way to do this. Is there something like a Future.get that can help me block until all the records have been fetched or timeout is signaled?

---

<div class="post-metadata">

**Author:** ![Brian](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/brian/32/2211_2.png) [@Brian](https://discuss.aerospike.com/u/Brian)\
**Post date:** [November 28, 2016, 6:02pm UTC](https://discuss.aerospike.com/t/application-wait-on-async-client/3633/2 "2016-11-28T18:02:05Z")

</div>

Use batch get to read multiple records and wait for all records to be read before getting a response.

```java
	public final void get(BatchPolicy policy, BatchListListener listener, List<BatchRead> records) ;

```
