Commit 4a2b4c1d73eee78e7e888ef2d2e9551f9dc7df34
1 parent
cdb11629
update..
Showing
1 changed file
with
1 additions
and
13 deletions
src/main/java/com/bsth/client/GpsBeforeBuffer.java
| ... | ... | @@ -75,15 +75,12 @@ public class GpsBeforeBuffer implements CommandLineRunner{ |
| 75 | 75 | |
| 76 | 76 | @Autowired |
| 77 | 77 | BufferSizeCheck bufferSizeCheck; |
| 78 | - @Autowired | |
| 79 | - SizeCheck sizeCheck; | |
| 80 | 78 | |
| 81 | 79 | ScheduledExecutorService sexec = Executors.newScheduledThreadPool(2); |
| 82 | 80 | |
| 83 | 81 | @Override |
| 84 | - public void run(String... strings) throws Exception { | |
| 82 | + public void run(String... strings) { | |
| 85 | 83 | sexec.scheduleWithFixedDelay(bufferSizeCheck, 60, 30, TimeUnit.SECONDS); |
| 86 | - sexec.scheduleWithFixedDelay(sizeCheck, 60, 60 * 5, TimeUnit.SECONDS); | |
| 87 | 84 | } |
| 88 | 85 | |
| 89 | 86 | @Component |
| ... | ... | @@ -94,13 +91,4 @@ public class GpsBeforeBuffer implements CommandLineRunner{ |
| 94 | 91 | GpsBeforeBuffer.clear(); |
| 95 | 92 | } |
| 96 | 93 | } |
| 97 | - | |
| 98 | - @Component | |
| 99 | - public static class SizeCheck extends Thread{ | |
| 100 | - | |
| 101 | - @Override | |
| 102 | - public void run() { | |
| 103 | - log.info("[SizeCheck] linkedList real size: " + linkedList.size() + " -current size: " + size); | |
| 104 | - } | |
| 105 | - } | |
| 106 | 94 | } |
| 107 | 95 | \ No newline at end of file | ... | ... |