* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.raft.messages;
-public class InstallSnapshotReply extends AbstractRaftRPC {
+public final class InstallSnapshotReply extends AbstractRaftRPC {
+ @java.io.Serial
private static final long serialVersionUID = 642227896390779503L;
// The followerId - this will be used to figure out which follower is
private final int chunkIndex;
private final boolean success;
- public InstallSnapshotReply(long term, String followerId, int chunkIndex,
- boolean success) {
+ public InstallSnapshotReply(final long term, final String followerId, final int chunkIndex, final boolean success) {
super(term);
this.followerId = followerId;
this.chunkIndex = chunkIndex;
public boolean isSuccess() {
return success;
}
+
+ @Override
+ public String toString() {
+ return "InstallSnapshotReply [term=" + getTerm()
+ + ", followerId=" + followerId
+ + ", chunkIndex=" + chunkIndex
+ + ", success=" + success + "]";
+ }
+
+ @Override
+ Object writeReplace() {
+ return new IR(this);
+ }
}