com.spotify.docker.client.messages.swarm.AutoValue_RaftConfig Maven / Gradle / Ivy
package com.spotify.docker.client.messages.swarm;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_RaftConfig extends RaftConfig {
private final Integer snapshotInterval;
private final Integer keepOldSnapshots;
private final Integer logEntriesForSlowFollowers;
private final Integer electionTick;
private final Integer heartbeatTick;
AutoValue_RaftConfig(
Integer snapshotInterval,
@Nullable Integer keepOldSnapshots,
Integer logEntriesForSlowFollowers,
Integer electionTick,
Integer heartbeatTick) {
if (snapshotInterval == null) {
throw new NullPointerException("Null snapshotInterval");
}
this.snapshotInterval = snapshotInterval;
this.keepOldSnapshots = keepOldSnapshots;
if (logEntriesForSlowFollowers == null) {
throw new NullPointerException("Null logEntriesForSlowFollowers");
}
this.logEntriesForSlowFollowers = logEntriesForSlowFollowers;
if (electionTick == null) {
throw new NullPointerException("Null electionTick");
}
this.electionTick = electionTick;
if (heartbeatTick == null) {
throw new NullPointerException("Null heartbeatTick");
}
this.heartbeatTick = heartbeatTick;
}
@JsonProperty(value = "SnapshotInterval")
@Override
public Integer snapshotInterval() {
return snapshotInterval;
}
@Nullable
@JsonProperty(value = "KeepOldSnapshots")
@Override
public Integer keepOldSnapshots() {
return keepOldSnapshots;
}
@JsonProperty(value = "LogEntriesForSlowFollowers")
@Override
public Integer logEntriesForSlowFollowers() {
return logEntriesForSlowFollowers;
}
@JsonProperty(value = "ElectionTick")
@Override
public Integer electionTick() {
return electionTick;
}
@JsonProperty(value = "HeartbeatTick")
@Override
public Integer heartbeatTick() {
return heartbeatTick;
}
@Override
public String toString() {
return "RaftConfig{"
+ "snapshotInterval=" + snapshotInterval + ", "
+ "keepOldSnapshots=" + keepOldSnapshots + ", "
+ "logEntriesForSlowFollowers=" + logEntriesForSlowFollowers + ", "
+ "electionTick=" + electionTick + ", "
+ "heartbeatTick=" + heartbeatTick
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof RaftConfig) {
RaftConfig that = (RaftConfig) o;
return (this.snapshotInterval.equals(that.snapshotInterval()))
&& ((this.keepOldSnapshots == null) ? (that.keepOldSnapshots() == null) : this.keepOldSnapshots.equals(that.keepOldSnapshots()))
&& (this.logEntriesForSlowFollowers.equals(that.logEntriesForSlowFollowers()))
&& (this.electionTick.equals(that.electionTick()))
&& (this.heartbeatTick.equals(that.heartbeatTick()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.snapshotInterval.hashCode();
h *= 1000003;
h ^= (keepOldSnapshots == null) ? 0 : this.keepOldSnapshots.hashCode();
h *= 1000003;
h ^= this.logEntriesForSlowFollowers.hashCode();
h *= 1000003;
h ^= this.electionTick.hashCode();
h *= 1000003;
h ^= this.heartbeatTick.hashCode();
return h;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy