From 9d22b756486b5d249a804494f4d901dcd033c49f Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 3 Apr 2023 16:22:19 +0200 Subject: [PATCH] Remove legacy raft message Proxy constructors These constructors are not invoked anywhere, remove them. This also means the writeExternal() method cannot legally be invoked. Change-Id: I6c72ac334b07218d4bfb0cb1cda37771db2c0aff Signed-off-by: Robert Varga --- .../cluster/raft/messages/InstallSnapshotReply.java | 11 ++--------- .../controller/cluster/raft/messages/RequestVote.java | 11 ++--------- .../cluster/raft/messages/RequestVoteReply.java | 9 ++------- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java index 16cc900701..1579ba2ee4 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshotReply.java @@ -66,16 +66,9 @@ public final class InstallSnapshotReply extends AbstractRaftRPC { public Proxy() { } - Proxy(final InstallSnapshotReply installSnapshotReply) { - this.installSnapshotReply = installSnapshotReply; - } - @Override - public void writeExternal(final ObjectOutput out) throws IOException { - out.writeLong(installSnapshotReply.getTerm()); - out.writeObject(installSnapshotReply.followerId); - out.writeInt(installSnapshotReply.chunkIndex); - out.writeBoolean(installSnapshotReply.success); + public void writeExternal(final ObjectOutput out) { + throw new UnsupportedOperationException(); } @Override diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java index 72d1496951..f9a984feae 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVote.java @@ -73,16 +73,9 @@ public final class RequestVote extends AbstractRaftRPC { public Proxy() { } - Proxy(final RequestVote requestVote) { - this.requestVote = requestVote; - } - @Override - public void writeExternal(final ObjectOutput out) throws IOException { - out.writeLong(requestVote.getTerm()); - out.writeObject(requestVote.candidateId); - out.writeLong(requestVote.lastLogIndex); - out.writeLong(requestVote.lastLogTerm); + public void writeExternal(final ObjectOutput out) { + throw new UnsupportedOperationException(); } @Override diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java index 7bfb7b68f0..9a194223ce 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RequestVoteReply.java @@ -50,14 +50,9 @@ public final class RequestVoteReply extends AbstractRaftRPC { public Proxy() { } - Proxy(final RequestVoteReply requestVoteReply) { - this.requestVoteReply = requestVoteReply; - } - @Override - public void writeExternal(final ObjectOutput out) throws IOException { - out.writeLong(requestVoteReply.getTerm()); - out.writeBoolean(requestVoteReply.voteGranted); + public void writeExternal(final ObjectOutput out) { + throw new UnsupportedOperationException(); } @Override -- 2.36.6