this.listener_thread.setDaemon(true);
this.eventLoop.setExitOnSigInt(true);
// Initialize the PrefetchQueryPlanner if we're allowed to execute
// speculative queries and we actually have some in the catalog
PrefetchQueryPlanner tmpPlanner = null;
if (hstore_conf.site.exec_prefetch_queries) {
boolean has_prefetch = false;
for (Procedure catalog_proc : this.catalogContext.procedures.values()) {
if (catalog_proc.getPrefetchable()) {
has_prefetch = true;
break;
}
}
if (has_prefetch) {
tmpPlanner = new PrefetchQueryPlanner(this.catalogContext,
hstore_site.getPartitionEstimator());
}
}
this.prefetchPlanner = tmpPlanner;
this.transactionPrefetch_callback = (this.prefetchPlanner != null ? new TransactionPrefetchCallback() : null);