• 1000 здесь что-то не так?
код
public List<DtvnAddonEquipmentRsnFeeResponse> getConcurrentAddonEquipmentAndRsnFee(CatalogOffersResponse response,
Map<String, Set<DtvnEquipmentOfferResponse>> addonMap, Set<DtvnEquipmentOfferResponse> equipmentOffersSet,
String zipCode, String creditClass) {
List<Callable<DtvnAddonEquipmentRsnFeeResponse>> callableObjList = new ArrayList<>();
List<DtvnAddonEquipmentRsnFeeResponse> dtvnAddonEquipmentResponseList;
for (Offer offer : response.getDirecTVNow().getBasePackages()) {
callableObjList.add(
() -> callAndGetAddonAndEquipmentOffers(offer, addonMap, equipmentOffersSet, zipCode, creditClass));
}
log.info("Done adding all baseOfferIds to Map {}", callableObjList.size());
@SuppressWarnings("unchecked")
Object[] getAddonAndEquipment = RxJavaHelper
.callConcurrentlyGetResult(callableObjList.toArray(new Callable[callableObjList.size()]));
Arrays.asList(getAddonAndEquipment).forEach(r -> {
if (r instanceof ServiceException) {
throw (ServiceException) r;
}
});
if (null == getAddonAndEquipment) {
log.error("Unable to retrieve the requested device details");
throw new ServiceException(ErrorMessages.OFFERS_PARSING_ERROR);
}
log.info("callConcurrentlyGetResult Response", getAddonAndEquipment);