private void setStateObservation(final UnitConfig unitConfig) throws InterruptedException { try { final UnitRemote unitRemote = Units.getFutureUnit(unitConfig, true).get(); addLoadedUnitRemote(unitRemote); identifyUnitRemote(unitRemote); incrementSuccessfullyRemotesNum(unitRemote.getLabel()); } catch (ExecutionException | NotAvailableException | InstantiationException ex) { incrementFailedRemotesNum(); LOGGER.warn("Could not get unitRemote of " + unitConfig.getLabel() + ". Dropped."); } checkDone(); }
if (UnitProcessor.isDalUnit(remote)) { if (!remote.isConnected()) { throw new NotAvailableException("Unit[" + remote.getLabel() + "] is currently not reachable!"); ExceptionPrinter.printHistory(new CouldNotPerformException("Could not record snapshot of " + remote.getLabel(), ex), LOGGER, LogLevel.WARN); snapshotBuilder.addAllServiceStateDescription(snapshotFutureEntry.getValue().get(5, TimeUnit.SECONDS).getServiceStateDescriptionList()); } catch (ExecutionException | TimeoutException ex) { ExceptionPrinter.printHistory(new CouldNotPerformException("Could not record snapshot of " + snapshotFutureEntry.getKey().getLabel(), ex), LOGGER);
@Override protected boolean check(ActionFuture actionFuture) throws CouldNotPerformException { if (actionFuture.getActionDescriptionCount() == 0) { throw new NotAvailableException(dataProvider.getLabel(), "ActionDescription"); } ActionDescription actionDescription = actionFuture.getActionDescription(0); if (!actionDescription.hasTransactionId() || actionDescription.getTransactionId() == 0) { // this is for compatibility reasons with old versions logger.warn("TransactionId has not been set for Action[" + ActionDescriptionProcessor.getDescription(actionFuture.getActionDescriptionList()) + "] of " + dataProvider); return true; } return dataProvider.getLatestTransactionId() >= actionDescription.getTransactionId(); } }
logger.debug("Source [" + sourceRemote.getLabel() + "] behaviour [" + sourceBehaviour + "]"); logger.debug("Targets [" + targetIds + "] behaviour [" + targetBehaviour + "]");
resourceAllocation.addResourceIds(ScopeGenerator.generateStringRep(getScope())); actionDescription.setDescription(actionDescription.getDescription().replace(ActionDescriptionProcessor.LABEL_KEY, getLabel())); try { String username = ""; Thread.currentThread().interrupt(); actionDescription.setLabel(actionDescription.getLabel().replace(ActionDescriptionProcessor.LABEL_KEY, getLabel()));
serviceStateDescription.setUnitType(unitType); actionDescriptionBuilder.setDescription(actionDescriptionBuilder.getDescription().replace(ActionDescriptionProcessor.LABEL_KEY, unitRemote.getLabel())); actionDescriptionBuilder.setLabel(actionDescriptionBuilder.getLabel().replace(ActionDescriptionProcessor.LABEL_KEY, unitRemote.getLabel()));