Skip to content

Commit e76dac2

Browse files
committed
Fix. Correct use of Stateful annotations
1 parent 4cea622 commit e76dac2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,9 @@ recommended for handling serverless loads.
513513

514514
### Stateless Actors
515515

516-
In addition to these types, Spawn also allows the developer to choose Stateful actors, who need to maintain the state, or Stateless, those who do not need to maintain the state.
517-
For this the developer just needs to make use of the correct annotation. For example I could declare a Serverless Actor using the following code:
516+
In addition to these types, Spawn also allows the developer to choose Stateful actors, who need to maintain the state,
517+
or Stateless, those who do not need to maintain the state.
518+
For this the developer just needs to make use of the correct annotation. For example, I could declare a Serverless Actor using the following code:
518519

519520
```java
520521
package io.eigr.spawn.test.actors;
@@ -525,7 +526,7 @@ import io.eigr.spawn.api.actors.annotations.Action;
525526
import io.eigr.spawn.api.actors.annotations.stateless.StatelessNamedActor;
526527
import io.eigr.spawn.java.test.domain.Actor;
527528

528-
@StatelessNamedActor(name = "test_joe", channel = "test.channel")
529+
@StatelessNamedActor(name = "test_joe")
529530
public class JoeActor {
530531
@Action
531532
public Value hi(Actor.Request msg, ActorContext<?> context) {
@@ -619,7 +620,7 @@ import io.eigr.spawn.api.actors.annotations.stateful.StatefulNamedActor;
619620
import io.eigr.spawn.api.actors.workflows.SideEffect;
620621
import io.eigr.spawn.java.demo.domain.Domain;
621622

622-
@StatefulNamedActor(name = "side_effect_actor", stateful = true, stateType = Domain.State.class)
623+
@StatefulNamedActor(name = "side_effect_actor", stateType = Domain.State.class)
623624
public class SideEffectActorExample {
624625
@Action
625626
public Value setLanguage(Domain.Request msg, ActorContext<Domain.State> ctx) throws Exception {
@@ -667,7 +668,7 @@ import io.eigr.spawn.java.demo.domain.Domain;
667668
import org.slf4j.Logger;
668669
import org.slf4j.LoggerFactory;
669670

670-
@StatefulNamedActor(name = "routing_actor", stateful = true, stateType = Domain.State.class)
671+
@StatefulNamedActor(name = "routing_actor", stateType = Domain.State.class)
671672
public class ForwardExample {
672673
private static final Logger log = LoggerFactory.getLogger(ForwardExample.class);
673674

@@ -707,7 +708,7 @@ import io.eigr.spawn.api.actors.annotations.stateful.StatefulNamedActor;
707708
import io.eigr.spawn.api.actors.workflows.Pipe;
708709
import io.eigr.spawn.java.demo.domain.Domain;
709710

710-
@StatefulNamedActor(name = "pipe_actor", stateful = true, stateType = Domain.State.class)
711+
@StatefulNamedActor(name = "pipe_actor", stateType = Domain.State.class)
711712
public class PipeActorExample {
712713

713714
@Action

0 commit comments

Comments
 (0)