Пример #1
0
  /**
   * 'Broadcast' (or receive) the list of all agents in a container. The information will be set to
   * the local {@link #loadInfo}.
   *
   * @param slices the slices
   * @throws ServiceException the service exception
   */
  private void broadcastGetAIDList(Service.Slice[] slices) throws ServiceException {

    loadInfo.resetAIDs4Container();
    logger.debug("Try to get AID's from all Containers !");

    for (int i = 0; i < slices.length; i++) {
      String sliceName = null;
      try {
        LoadServiceSlice slice = (LoadServiceSlice) slices[i];
        sliceName = slice.getNode().getName();
        logger.debug("Try to get AID''s from " + sliceName);

        AID[] aid = slice.getAIDList();
        loadInfo.putAIDs4Container(sliceName, aid);
      } catch (ServiceException | IMTPException t) {
        // NOTE that slices are always retrieved from the main and not from the cache --> No need to
        // retry in case of failure
        logger.warn("Error while trying to get AID's from " + sliceName, t);
      }
    }

    loadInfo.countAIDs4Container();
  }