@Override public ReconfigurationTaskStatus getReconfigurationStatus() throws IOException { GetReconfigurationStatusResponseProto response; Map<PropertyChange, Optional<String>> statusMap = null; long startTime; long endTime = 0; try { response = rpcProxy.getReconfigurationStatus(NULL_CONTROLLER, VOID_GET_RECONFIG_STATUS); startTime = response.getStartTime(); if (response.hasEndTime()) { endTime = response.getEndTime(); } if (response.getChangesCount() > 0) { statusMap = Maps.newHashMap(); for (GetReconfigurationStatusConfigChangeProto change : response.getChangesList()) { PropertyChange pc = new PropertyChange( change.getName(), change.getNewValue(), change.getOldValue()); String errorMessage = null; if (change.hasErrorMessage()) { errorMessage = change.getErrorMessage(); } statusMap.put(pc, Optional.fromNullable(errorMessage)); } } } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } return new ReconfigurationTaskStatus(startTime, endTime, statusMap); }