You're basically looking at retrieving records by a list of keys. This is a batch-read operation in Aerospike. Every language client for Aerospike should have this capability.
For example, in the Python client this is the Client.get_many method:
from __future__ import print_function
import aerospike
from aerospike.exception import AerospikeError
import sys
config = { 'hosts': [('127.0.0.1', 3000)] }
client = aerospike.client(config).connect()
try:
# assume the fourth key has no matching record
keys = [
('test', 'demo', '1'),
('test', 'demo', '2'),
('test', 'demo', '3'),
('test', 'demo', '4')
]
records = client.get_many(keys)
print records
except AerospikeError as e:
print("Error: {0} [{1}]".format(e.msg, e.code))
sys.exit(1)
finally:
client.close()
Similarly, in the Java client the AerospikeClient.get() method can take a list of keys.