public Future<BatchGetItemResult> batchGetItemAsync(
            final BatchGetItemRequest batchGetItemRequest,
            final AsyncHandler<BatchGetItemRequest, BatchGetItemResult> asyncHandler)
                    throws AmazonServiceException, AmazonClientException {
        return executorService.submit(new Callable<BatchGetItemResult>() {
            public BatchGetItemResult call() throws Exception {
            	BatchGetItemResult result;
                try {
            		result = batchGetItem(batchGetItemRequest);
            	} catch (Exception ex) {
            	    asyncHandler.onError(ex);
    				throw ex;
            	}
            	asyncHandler.onSuccess(batchGetItemRequest, result);
               	return result;
		    }
		});
    }
public Future < BatchGetItemResult > batchGetItemAsync ( final BatchGetItemRequest batchGetItemRequest , final AsyncHandler < BatchGetItemRequest , BatchGetItemResult > asyncHandler ) throws AmazonServiceException , AmazonClientException { return executorService . submit ( new Callable < BatchGetItemResult > ( ) { public BatchGetItemResult call ( ) throws Exception { BatchGetItemResult result ; try { result = batchGetItem ( batchGetItemRequest ) ; } catch ( Exception ex ) { asyncHandler . onError ( ex ) ; throw ex ; } asyncHandler . onSuccess ( batchGetItemRequest , result ) ; return result ; } } ) ; }
<p>
Retrieves the attributes for multiple items from multiple tables using
their primary keys.
</p>
<p>
The maximum number of item attributes that can be retrieved for a
single operation is 100. Also, the number of items retrieved is
constrained by a 1 MB the size limit. If the response size limit is
exceeded or a partial result is returned due to an internal processing
failure, Amazon DynamoDB returns an <code>UnprocessedKeys</code> value
so you can retry the operation starting with the next item to get.
</p>
<p>
Amazon DynamoDB automatically adjusts the number of items returned per
page to enforce this limit. For example, even if you ask to retrieve
100 items, but each individual item is 50k in size, the system returns
20 items and an appropriate <code>UnprocessedKeys</code> value so you
can get the next page of results. If necessary, your application needs
its own logic to assemble the pages of results into one set.
</p>

@param batchGetItemRequest Container for the necessary parameters to
execute the BatchGetItem operation on AmazonDynamoDB.
@param asyncHandler Asynchronous callback handler for events in the
life-cycle of the request. Users could provide the implementation of
the four callback methods in this interface to process the operation
result or handle the exception.

@return A Java Future object containing the response from the
BatchGetItem service method, as returned by AmazonDynamoDB.

@throws AmazonClientException
If any internal errors are encountered inside the client while
attempting to make the request or handle the response.  For example
if a network connection is not available.
@throws AmazonServiceException
If an error response is returned by AmazonDynamoDB indicating
either a problem with the data in the request, or a server side issue.