private void createDashboardConfigFile() throws IOException { try (FileWriter fw = createOrGetFile(webDir, "config")) { fw.write(createConfigJson(DashboardConfiguration.from(webRefreshIntervalMillis, ZonedDateTime.now()))); fw.flush(); } catch (IOException ioe) { LOG.error("Failed to write config file."); throw ioe; } }
public DashboardConfigHandler( CompletableFuture<String> localRestAddress, GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, DashboardConfiguration, EmptyMessageParameters> messageHeaders, long refreshInterval) { super(localRestAddress, leaderRetriever, timeout, responseHeaders, messageHeaders); dashboardConfiguration = DashboardConfiguration.from(refreshInterval, ZonedDateTime.now()); }
public DashboardConfigHandler( CompletableFuture<String> localRestAddress, GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, DashboardConfiguration, EmptyMessageParameters> messageHeaders, long refreshInterval) { super(localRestAddress, leaderRetriever, timeout, responseHeaders, messageHeaders); dashboardConfiguration = DashboardConfiguration.from(refreshInterval, ZonedDateTime.now()); }
public DashboardConfigHandler( CompletableFuture<String> localRestAddress, GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, DashboardConfiguration, EmptyMessageParameters> messageHeaders, long refreshInterval) { super(localRestAddress, leaderRetriever, timeout, responseHeaders, messageHeaders); dashboardConfiguration = DashboardConfiguration.from(refreshInterval, ZonedDateTime.now()); }
public DashboardConfigHandler(Executor executor, long refreshInterval) { super(executor); dashboardConfiguration = DashboardConfiguration.from(refreshInterval, ZonedDateTime.now()); try { this.configString = createConfigJson(dashboardConfiguration); } catch (Exception e) { // should never happen throw new RuntimeException(e.getMessage(), e); } }
private void createDashboardConfigFile() throws IOException { try (FileWriter fw = createOrGetFile(webDir, "config")) { fw.write(createConfigJson(DashboardConfiguration.from(webRefreshIntervalMillis, ZonedDateTime.now()))); fw.flush(); } catch (IOException ioe) { LOG.error("Failed to write config file."); throw ioe; } }
private void createDashboardConfigFile() throws IOException { try (FileWriter fw = createOrGetFile(webDir, "config")) { fw.write(createConfigJson(DashboardConfiguration.from(webRefreshIntervalMillis, ZonedDateTime.now()))); fw.flush(); } catch (IOException ioe) { LOG.error("Failed to write config file."); throw ioe; } }