+ Candidate {
+ @Override
+ public RaftActorBehavior createBehavior(RaftActorContext context) {
+ return new Candidate(context);
+ }
+ },
+ Follower {
+ @Override
+ public RaftActorBehavior createBehavior(RaftActorContext context) {
+ return new Follower(context);
+ }
+ },
+ Leader {
+ @Override
+ public RaftActorBehavior createBehavior(RaftActorContext context) {
+ return new Leader(context);
+ }
+ },
+ IsolatedLeader {
+ @Override
+ public RaftActorBehavior createBehavior(RaftActorContext context) {
+ return new IsolatedLeader(context);
+ }
+ };
+
+ public abstract RaftActorBehavior createBehavior(RaftActorContext context);