throw new AerospikeException(ResultCode.SERVER_NOT_AVAILABLE, "Scan failed because cluster is empty.");
}
if (policy.concurrentNodes) {
ScanExecutor executor = new ScanExecutor(cluster, nodes, policy, namespace, setName, callback, binNames);
executor.scanParallel();
}
else {
for (Node node : nodes) {
scanNode(policy, node, namespace, setName, callback, binNames);
}