Application wait on Async client


#1

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?


#2

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

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