SEBSERV-182 updateErrors
This commit is contained in:
		
							parent
							
								
									5724a750b7
								
							
						
					
					
						commit
						03c05c7372
					
				
					 2 changed files with 50 additions and 35 deletions
				
			
		|  | @ -174,7 +174,7 @@ public class MonitoringRunningExam implements TemplateComposer { | |||
|         this.serverPushService.runServerPush( | ||||
|                 new ServerPushContext( | ||||
|                         content, | ||||
|                         Utils.truePredicate(), | ||||
|                         context -> clientTable.getUpdateErrors() > 5, | ||||
|                         createServerPushUpdateErrorHandler(this.pageService, pageContext)), | ||||
|                 this.pollInterval, | ||||
|                 context -> clientTable.updateValues(), | ||||
|  |  | |||
|  | @ -116,6 +116,8 @@ public final class ClientConnectionTable { | |||
|     private boolean forceUpdateAll = false; | ||||
|     private boolean updateInProgress = false; | ||||
| 
 | ||||
|     private int updateErrors = 0; | ||||
| 
 | ||||
|     public ClientConnectionTable( | ||||
|             final PageService pageService, | ||||
|             final Composite tableRoot, | ||||
|  | @ -188,6 +190,10 @@ public final class ClientConnectionTable { | |||
|         this.table.layout(); | ||||
|     } | ||||
| 
 | ||||
|     public int getUpdateErrors() { | ||||
|         return this.updateErrors; | ||||
|     } | ||||
| 
 | ||||
|     public WidgetFactory getWidgetFactory() { | ||||
|         return this.pageService.getWidgetFactory(); | ||||
|     } | ||||
|  | @ -320,6 +326,9 @@ public final class ClientConnectionTable { | |||
|     } | ||||
| 
 | ||||
|     private void updateValuesAsync() { | ||||
| 
 | ||||
|         try { | ||||
| 
 | ||||
|             if (this.statusFilterChanged || this.forceUpdateAll) { | ||||
|                 this.toDelete.clear(); | ||||
|                 this.toDelete.addAll(this.tableMapping.keySet()); | ||||
|  | @ -358,6 +367,12 @@ public final class ClientConnectionTable { | |||
| 
 | ||||
|             this.forceUpdateAll = false; | ||||
|             this.updateInProgress = false; | ||||
|             this.updateErrors = 0; | ||||
| 
 | ||||
|         } catch (final Exception e) { | ||||
|             log.error("Unexpected error while updating client connection table: ", e); | ||||
|             this.updateErrors++; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public void updateGUI() { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 anhefti
						anhefti