File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
spring-context/src/main/java/org/springframework/context/support Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .context .support ;
18
18
19
- import java .time .Duration ;
20
19
import java .util .ArrayList ;
21
20
import java .util .Collections ;
22
21
import java .util .Comparator ;
@@ -561,17 +560,16 @@ public void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> conte
561
560
562
561
@ Override
563
562
public void afterRestore (org .crac .Context <? extends org .crac .Resource > context ) {
564
- long restartTime = System .nanoTime ();
565
563
logger .info ("Restarting Spring-managed lifecycle beans after JVM restore" );
566
564
restartAfterStop ();
567
565
568
566
// Barrier for prevent-shutdown thread not needed anymore
569
567
this .barrier = null ;
570
568
571
- long timeTakenToRestart = Duration . ofNanos ( System . nanoTime () - restartTime ). toMillis ();
572
- long timeTakenToRestoreJvm = CRaCMXBean . getCRaCMXBean (). getUptimeSinceRestore ();
573
- logger . info ( "Spring-managed lifecycle restart completed in " + timeTakenToRestart
574
- + " ms (restored JVM running for " + timeTakenToRestoreJvm + " ms)" );
569
+ if (! checkpointOnRefresh ) {
570
+ logger . info ( "Spring-managed lifecycle restart completed (restored JVM running for " +
571
+ CRaCMXBean . getCRaCMXBean (). getUptimeSinceRestore () + " ms)" );
572
+ }
575
573
}
576
574
577
575
private void awaitPreventShutdownBarrier () {
You can’t perform that action at this time.
0 commit comments