@@ -116,7 +116,6 @@ public class LocalNode extends Node {
116116 private final List <SessionSlot > factories ;
117117 private final Cache <SessionId , SessionSlot > currentSessions ;
118118 private final Cache <SessionId , TemporaryFilesystem > tempFileSystems ;
119- private final Regularly regularly ;
120119 private final AtomicInteger pendingSessions = new AtomicInteger ();
121120
122121 private LocalNode (
@@ -162,19 +161,22 @@ private LocalNode(
162161 .build ();
163162
164163 this .tempFileSystems = CacheBuilder .newBuilder ()
165- .expireAfterAccess (sessionTimeout )
166- .ticker (ticker )
167- .removalListener ((RemovalListener <SessionId , TemporaryFilesystem >) notification -> {
168- TemporaryFilesystem tempFS = notification .getValue ();
169- tempFS .deleteTemporaryFiles ();
170- tempFS .deleteBaseDir ();
171- })
172- .build ();
173-
174- this .regularly = new Regularly ("Local Node: " + externalUri );
175- regularly .submit (currentSessions ::cleanUp , Duration .ofSeconds (30 ), Duration .ofSeconds (30 ));
176- regularly .submit (tempFileSystems ::cleanUp , Duration .ofSeconds (30 ), Duration .ofSeconds (30 ));
177- regularly .submit (() -> bus .fire (new NodeHeartBeatEvent (getStatus ())), heartbeatPeriod , heartbeatPeriod );
164+ .expireAfterAccess (sessionTimeout )
165+ .ticker (ticker )
166+ .removalListener ((RemovalListener <SessionId , TemporaryFilesystem >) notification -> {
167+ TemporaryFilesystem tempFS = notification .getValue ();
168+ tempFS .deleteTemporaryFiles ();
169+ tempFS .deleteBaseDir ();
170+ })
171+ .build ();
172+
173+ Regularly sessionCleanup = new Regularly ("Session Cleanup Node: " + externalUri );
174+ sessionCleanup .submit (currentSessions ::cleanUp , Duration .ofSeconds (30 ), Duration .ofSeconds (30 ));
175+ Regularly tmpFileCleanup = new Regularly ("TempFile Cleanup Node: " + externalUri );
176+ tmpFileCleanup .submit (tempFileSystems ::cleanUp , Duration .ofSeconds (30 ), Duration .ofSeconds (30 ));
177+ Regularly regularHeartBeat = new Regularly ("Heartbeat Node: " + externalUri );
178+ regularHeartBeat .submit (() -> bus .fire (new NodeHeartBeatEvent (getStatus ())), heartbeatPeriod ,
179+ heartbeatPeriod );
178180
179181 bus .addListener (SessionClosedEvent .listener (id -> {
180182 // Listen to session terminated events so we know when to fire the NodeDrainComplete event
0 commit comments