Javaflow Continuation: Trying to Save Static variable
-
14-04-2021 - |
Frage
I had been trying to create some check-pointing solutions using Javaflow . It works well with all the local variable. But it is unable to save the static variable instance. I am trying to do something like this:
foo( ){
//Doing Something
//Writing the static variable value, suppose
MyClass.StaticValue=10;
Continuation.suspend( ); //Checkpoint P created
//Do Something
//Update the static value, suppose
MyClass.StaticValue=11;
return;
}
Now when i try to restore back from checkPoint P, I expect to read the StaticValue as 10, but it is 11. I have two questions regarding it:
- Is it a expected behavior from Javaflow or I am missing something while using Javaflow?
- Is there a smart way to store these static variable other than using some versioning and storing all of them.
Lösung
I think I found my answer: 1. Javaflow don't support static variables check-pointing. 2. Only versioning looks like a direction.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow