[Java] Support wasCurrentActorRestarted in actor task. (#13120)

* Remove check.

* Add test

* fix lint

* lint

* Fix spotless lint

* Address comments.

* Fix lint

Co-authored-by: Qing Wang <jovany.wq@antgroup.com>
This commit is contained in:
Qing Wang
2021-01-02 11:31:08 +08:00
committed by GitHub
parent 710615c228
commit d3dd5b87ce
3 changed files with 29 additions and 27 deletions
@@ -17,11 +17,7 @@ public interface RuntimeContext {
*/
ActorId getCurrentActorId();
/**
* Returns true if the current actor was restarted, false if it's created for the first time.
*
* <p>Note, this method should only be called from an actor creation task.
*/
/** Returns true if the current actor was restarted, otherwise false. */
boolean wasCurrentActorRestarted();
/**