use of com.aerospike.client.listener.RecordSequenceListener in project aerospike-client-java by aerospike.
the class TestAsyncScan method asyncScan.
@Test
public void asyncScan() {
recordCount = 0;
ScanPolicy policy = new ScanPolicy();
client.scanAll(eventLoop, new RecordSequenceListener() {
@Override
public void onRecord(Key key, Record record) throws AerospikeException {
recordCount++;
if ((recordCount % 10000) == 0) {
;
}
}
@Override
public void onSuccess() {
notifyComplete();
}
@Override
public void onFailure(AerospikeException e) {
setError(e);
notifyComplete();
}
}, policy, args.namespace, args.set);
waitTillComplete();
}
Aggregations