added prerestart and postrestart annotations and hooks into the supervisor fault handler for active objects
This commit is contained in:
parent
45bd6ebe5c
commit
5c99b4ed8d
11 changed files with 646 additions and 509 deletions
|
|
@ -2,6 +2,8 @@ package se.scalablesolutions.akka.api;
|
|||
|
||||
import se.scalablesolutions.akka.annotation.state;
|
||||
import se.scalablesolutions.akka.annotation.transactional;
|
||||
import se.scalablesolutions.akka.annotation.prerestart;
|
||||
import se.scalablesolutions.akka.annotation.postrestart;
|
||||
import se.scalablesolutions.akka.kernel.state.*;
|
||||
|
||||
public class InMemStateful {
|
||||
|
|
@ -77,6 +79,16 @@ public class InMemStateful {
|
|||
setMapState(key, msg);
|
||||
}
|
||||
|
||||
@prerestart
|
||||
public void preRestart() {
|
||||
System.out.println("################ PRE RESTART");
|
||||
}
|
||||
|
||||
@postrestart
|
||||
public void postRestart() {
|
||||
System.out.println("################ POST RESTART");
|
||||
}
|
||||
|
||||
/*
|
||||
public void clashOk(String key, String msg, InMemClasher clasher) {
|
||||
mapState.put(key, msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue