Question

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:

  1. Is it a expected behavior from Javaflow or I am missing something while using Javaflow?
  2. Is there a smart way to store these static variable other than using some versioning and storing all of them.
Was it helpful?

Solution

I think I found my answer: 1. Javaflow don't support static variables check-pointing. 2. Only versioning looks like a direction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top