deprecate closure-taking Props factories, see #3081
- base Props on Deploy, Class and Seq[Any] (i.e. constructor args) - remove deprecated Props usage from akka-docs sample code - rewrite UntypedActorDocTestBase - rewrite Java/Scala doc section on actor creation - add migration guide entry
This commit is contained in:
parent
64f664a706
commit
28aad82b1a
80 changed files with 2268 additions and 1641 deletions
|
|
@ -66,6 +66,7 @@ public class ConsistentHashingRouterDocTestBase {
|
|||
static
|
||||
//#cache-actor
|
||||
public final class Evict implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public final String key;
|
||||
public Evict(String key) {
|
||||
this.key = key;
|
||||
|
|
@ -76,6 +77,7 @@ public class ConsistentHashingRouterDocTestBase {
|
|||
static
|
||||
//#cache-actor
|
||||
public final class Get implements Serializable, ConsistentHashable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public final String key;
|
||||
public Get(String key) {
|
||||
this.key = key;
|
||||
|
|
@ -89,6 +91,7 @@ public class ConsistentHashingRouterDocTestBase {
|
|||
static
|
||||
//#cache-actor
|
||||
public final class Entry implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public final String key;
|
||||
public final String value;
|
||||
public Entry(String key, String value) {
|
||||
|
|
@ -122,7 +125,7 @@ public class ConsistentHashingRouterDocTestBase {
|
|||
}
|
||||
};
|
||||
|
||||
ActorRef cache = system.actorOf(new Props(Cache.class).withRouter(
|
||||
ActorRef cache = system.actorOf(Props.create(Cache.class).withRouter(
|
||||
new ConsistentHashingRouter(10).withHashMapper(hashMapper)),
|
||||
"cache");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue