private void performIOMaintenance(Operation post, long now, MaintenanceStage nextStage, long deadline) { try { this.operationTracker.performMaintenance(now); performMaintenanceStage(post, nextStage, deadline); } catch (Exception e) { log(Level.WARNING, "Exception: %s", Utils.toString(e)); performMaintenanceStage(post, nextStage, deadline); } }
public void performNodeSelectorChangeMaintenance(Operation post, long now, MaintenanceStage nextStage, boolean isCheckRequired, long deadline) { if (isCheckRequired && checkAndScheduleNodeSelectorSynch(post, nextStage, deadline)) { return; } try { Iterator<Entry<String, NodeGroupState>> it = this.pendingNodeSelectorsForFactorySynch .entrySet() .iterator(); while (it.hasNext()) { Entry<String, NodeGroupState> e = it.next(); it.remove(); performNodeSelectorChangeMaintenance(e); } } finally { this.host.performMaintenanceStage(post, nextStage, deadline); } }
/** * Initiates host periodic maintenance cycle */ private void scheduleMaintenance() { Runnable r = () -> { OperationContext.setAuthorizationContext(this.getSystemAuthorizationContext()); this.state.lastMaintenanceTimeUtcMicros = Utils.getSystemNowMicrosUtc(); long deadline = this.state.lastMaintenanceTimeUtcMicros + this.state.maintenanceIntervalMicros; performMaintenanceStage(Operation.createPost(getUri()), MaintenanceStage.UTILS, deadline); }; long intervalMicros = getMaintenanceCheckIntervalMicros(); this.maintenanceTask = scheduleCore(r, intervalMicros, TimeUnit.MICROSECONDS); }
Utils.toString(e)); this.host.performMaintenanceStage(post, nextStage, deadline); return;
return; performMaintenanceStage(post, stage, deadline); } catch (Exception e) { log(Level.SEVERE, "Uncaught exception: %s", Utils.toString(e));