private DataList<DATATYPE> drain(DataList<DATATYPE> dataList) {
            for (DATATYPE item : dataList.incoming().drain())
                dataList.add(item);
            complete(dataList); // Signal completion to listeners
            return dataList;
        }
Wait until all data is available.
When and if this returns normally all data is available in the returned data list
container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java