Modernize sal-akka-raft 29/103529/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Dec 2022 16:17:54 +0000 (17:17 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Dec 2022 16:52:25 +0000 (17:52 +0100)
commit67d8d3684dda352f957990c80c8e628dabcd0ca6
treeed0794eee7ca6dee5f0c9b55f8026e5de22904a3
parent8f7f6ed83f1ab21aa9ba1fb2f4f9fbad3a9bfa56
Modernize sal-akka-raft

Use instanceof and switch expressions to improve code flows. Also
shortcut handleRequestVote(), as we can have the instance casted
in AbstractLeader.

Change-Id: Ib726c79fbcc667335a3749f528b3836dc3896e73
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorDelegatingPersistentDataProvider.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoverySupport.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorServerConfigurationSupport.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotMessageSupport.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/ServerInfo.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/SimpleReplicatedLogEntrySerializer.java