org.graylog2.shared.messageq.AutoValue_MessageQueueWriter_Metrics Maven / Gradle / Ivy
package org.graylog2.shared.messageq;
import com.codahale.metrics.Meter;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_MessageQueueWriter_Metrics extends MessageQueueWriter.Metrics {
private final Meter writtenMessages;
private final Meter writtenBytes;
private final Meter failedWriteAttempts;
private AutoValue_MessageQueueWriter_Metrics(
Meter writtenMessages,
Meter writtenBytes,
Meter failedWriteAttempts) {
this.writtenMessages = writtenMessages;
this.writtenBytes = writtenBytes;
this.failedWriteAttempts = failedWriteAttempts;
}
@Override
public Meter writtenMessages() {
return writtenMessages;
}
@Override
public Meter writtenBytes() {
return writtenBytes;
}
@Override
public Meter failedWriteAttempts() {
return failedWriteAttempts;
}
@Override
public String toString() {
return "Metrics{"
+ "writtenMessages=" + writtenMessages + ", "
+ "writtenBytes=" + writtenBytes + ", "
+ "failedWriteAttempts=" + failedWriteAttempts
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof MessageQueueWriter.Metrics) {
MessageQueueWriter.Metrics that = (MessageQueueWriter.Metrics) o;
return this.writtenMessages.equals(that.writtenMessages())
&& this.writtenBytes.equals(that.writtenBytes())
&& this.failedWriteAttempts.equals(that.failedWriteAttempts());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= writtenMessages.hashCode();
h$ *= 1000003;
h$ ^= writtenBytes.hashCode();
h$ *= 1000003;
h$ ^= failedWriteAttempts.hashCode();
return h$;
}
static final class Builder extends MessageQueueWriter.Metrics.Builder {
private Meter writtenMessages;
private Meter writtenBytes;
private Meter failedWriteAttempts;
Builder() {
}
@Override
public MessageQueueWriter.Metrics.Builder writtenMessages(Meter writtenMessages) {
if (writtenMessages == null) {
throw new NullPointerException("Null writtenMessages");
}
this.writtenMessages = writtenMessages;
return this;
}
@Override
public MessageQueueWriter.Metrics.Builder writtenBytes(Meter writtenBytes) {
if (writtenBytes == null) {
throw new NullPointerException("Null writtenBytes");
}
this.writtenBytes = writtenBytes;
return this;
}
@Override
public MessageQueueWriter.Metrics.Builder failedWriteAttempts(Meter failedWriteAttempts) {
if (failedWriteAttempts == null) {
throw new NullPointerException("Null failedWriteAttempts");
}
this.failedWriteAttempts = failedWriteAttempts;
return this;
}
@Override
public MessageQueueWriter.Metrics build() {
if (this.writtenMessages == null
|| this.writtenBytes == null
|| this.failedWriteAttempts == null) {
StringBuilder missing = new StringBuilder();
if (this.writtenMessages == null) {
missing.append(" writtenMessages");
}
if (this.writtenBytes == null) {
missing.append(" writtenBytes");
}
if (this.failedWriteAttempts == null) {
missing.append(" failedWriteAttempts");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_MessageQueueWriter_Metrics(
this.writtenMessages,
this.writtenBytes,
this.failedWriteAttempts);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy