| 
														
															@@ -59,6 +59,8 @@ public class PredictPidContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     OSS client; 
														 | 
														
														 | 
														
															     OSS client; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private static ConcurrentHashMap<String,Double>  lambdaCache=new ConcurrentHashMap<>(); 
														 | 
														
														 | 
														
															     private static ConcurrentHashMap<String,Double>  lambdaCache=new ConcurrentHashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private static ConcurrentHashMap<String,Double>  latestThresholdCache=new ConcurrentHashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private Date cacheDate; 
														 | 
														
														 | 
														
															     private Date cacheDate; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @PostConstruct 
														 | 
														
														 | 
														
															     @PostConstruct 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -103,6 +105,7 @@ public class PredictPidContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     Double lambdaNew=lambdaCache.getOrDefault(group,0d)+ 
														 | 
														
														 | 
														
															                     Double lambdaNew=lambdaCache.getOrDefault(group,0d)+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                             kp*Double.parseDouble(cols[1])+ki*Double.parseDouble(cols[2])+kd*Double.parseDouble(cols[3]); 
														 | 
														
														 | 
														
															                             kp*Double.parseDouble(cols[1])+ki*Double.parseDouble(cols[2])+kd*Double.parseDouble(cols[3]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     lambdaCache.put(group,lambdaNew); 
														 | 
														
														 | 
														
															                     lambdaCache.put(group,lambdaNew); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    latestThresholdCache.put(group,Double.parseDouble(cols[4].trim())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 }catch (Exception e){ 
														 | 
														
														 | 
														
															                 }catch (Exception e){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     e.printStackTrace(); 
														 | 
														
														 | 
														
															                     e.printStackTrace(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -132,7 +135,6 @@ public class PredictPidContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             OSSObject object=client.getObject(bucketName,lambdaFileName); 
														 | 
														
														 | 
														
															             OSSObject object=client.getObject(bucketName,lambdaFileName); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if(object==null) return; 
														 | 
														
														 | 
														
															             if(object==null) return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if(cacheDate!=null&& !cacheDate.before(object.getObjectMetadata().getLastModified())) return; 
														 | 
														
														 | 
														
															             if(cacheDate!=null&& !cacheDate.before(object.getObjectMetadata().getLastModified())) return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            if(cacheDate!=null&& cacheDate.after(object.getObjectMetadata().getLastModified())) return; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             StringBuilder builder=new StringBuilder(); 
														 | 
														
														 | 
														
															             StringBuilder builder=new StringBuilder(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             InputStream is=object.getObjectContent(); 
														 | 
														
														 | 
														
															             InputStream is=object.getObjectContent(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             InputStreamReader isr=new InputStreamReader(is); 
														 | 
														
														 | 
														
															             InputStreamReader isr=new InputStreamReader(is); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -152,4 +154,8 @@ public class PredictPidContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public static Double getPidLambda(String group){ 
														 | 
														
														 | 
														
															     public static Double getPidLambda(String group){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return lambdaCache.getOrDefault(group,0d); 
														 | 
														
														 | 
														
															         return lambdaCache.getOrDefault(group,0d); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public static Double getLatestThreshold(String group){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return latestThresholdCache.getOrDefault(group,0d); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 |