// Send out all of the prefetch requests first
for (int site_id = 0; site_id < this.num_sites; site_id++) {
// Blast out this mofo. Tell them that Rico sent you...
if (builders[site_id] != null && builders[site_id].getPrefetchFragmentsCount() > 0) {
TransactionInitRequest request = builders[site_id].build();
if (site_id == this.local_site_id) {
this.transactionInit_handler.remoteHandler(null, request, null);
} else {
ProtoRpcController controller = ts.getTransactionInitController(site_id);
this.channels[site_id].transactionInit(controller, request, callback);
}
prefetch_ctr += request.getPrefetchFragmentsCount();
sent_ctr++;
builders[site_id] = null;
}
} // FOR
// Then send out the ones without prefetching. These should all be the same
// builder so we have to make sure that we only build it once.
TransactionInitRequest request = null;
for (int site_id = 0; site_id < this.num_sites; site_id++) {
if (builders[site_id] != null) {
if (request == null) request = builders[site_id].build();
if (site_id == this.local_site_id) {
this.transactionInit_handler.remoteHandler(null, request, null);