{
if (!needRead[i])
continue;
String path = paths.get(i);
cbList[i] = new GetDataCallbackHandler();
_zkClient.asyncGetData(path, cbList[i]);
}
// wait for completion
for (int i = 0; i < cbList.length; i++)
{
if (!needRead[i])
continue;
GetDataCallbackHandler cb = cbList[i];
cb.waitForSuccess();
}
// construct return results
List<T> records = new ArrayList<T>(Collections.<T> nCopies(paths.size(), null));
for (int i = 0; i < paths.size(); i++)
{
if (!needRead[i])
continue;
GetDataCallbackHandler cb = cbList[i];
if (Code.get(cb.getRc()) == Code.OK)
{
@SuppressWarnings("unchecked")
T record = (T) _zkClient.deserialize(cb._data, paths.get(i));
records.set(i, record);
if (stats != null)