Esempio n. 1
0
ObjectResultPtr AdapterI::get(Ice::Int category, const MyUtil::LongSeq& ids,
		bool parallel, int timeout) {
	if (_cluster <= 0) {
		try {
			return locate(0, timeout)->locateObjects(category, ids);
		} catch (Ice::Exception& e) {
			MCE_WARN("ServiceAdapter::get -> locateObjects err:" << e);
		}
		return new ObjectResult;
	}

	if (parallel) {
		CollectorPtr action = new ParallelCollector(*this, _cluster, category,
				ids, timeout);
		return action->execute();
	} else {
		return SerialCollector(*this, _cluster, category, ids, timeout).execute();
	}
}