package org.opendaylight.controller.cluster.raft.messages;
import com.google.common.base.Optional;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
private final Optional<Integer> lastChunkHashCode;
private final Optional<ServerConfigurationPayload> serverConfig;
+ @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "Stores a reference to an externally mutable byte[] "
+ + "object but this is OK since this class is merely a DTO and does not process byte[] internally. "
+ + "Also it would be inefficient to create a copy as the byte[] could be large.")
public InstallSnapshot(long term, String leaderId, long lastIncludedIndex, long lastIncludedTerm, byte[] data,
int chunkIndex, int totalChunks, Optional<Integer> lastChunkHashCode,
Optional<ServerConfigurationPayload> serverConfig) {
return lastIncludedTerm;
}
+ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Exposes a mutable object stored in a field but "
+ + "this is OK since this class is merely a DTO and does not process the byte[] internally. "
+ + "Also it would be inefficient to create a return copy as the byte[] could be large.")
public byte[] getData() {
return data;
}