com.github.kristofa.brave.AutoValue_BraveCallable Maven / Gradle / Ivy
package com.github.kristofa.brave;
import com.github.kristofa.brave.internal.Nullable;
import com.twitter.zipkin.gen.Span;
import java.util.concurrent.Callable;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_BraveCallable extends BraveCallable {
private final Callable wrappedCallable;
private final LocalSpanThreadBinder localSpanThreadBinder;
private final Span currentLocalSpan;
private final ServerSpanThreadBinder serverSpanThreadBinder;
private final ServerSpan currentServerSpan;
AutoValue_BraveCallable(
Callable wrappedCallable,
@Nullable LocalSpanThreadBinder localSpanThreadBinder,
@Nullable Span currentLocalSpan,
ServerSpanThreadBinder serverSpanThreadBinder,
@Nullable ServerSpan currentServerSpan) {
if (wrappedCallable == null) {
throw new NullPointerException("Null wrappedCallable");
}
this.wrappedCallable = wrappedCallable;
this.localSpanThreadBinder = localSpanThreadBinder;
this.currentLocalSpan = currentLocalSpan;
if (serverSpanThreadBinder == null) {
throw new NullPointerException("Null serverSpanThreadBinder");
}
this.serverSpanThreadBinder = serverSpanThreadBinder;
this.currentServerSpan = currentServerSpan;
}
@Override
Callable wrappedCallable() {
return wrappedCallable;
}
@Nullable
@Override
LocalSpanThreadBinder localSpanThreadBinder() {
return localSpanThreadBinder;
}
@Nullable
@Override
Span currentLocalSpan() {
return currentLocalSpan;
}
@Override
ServerSpanThreadBinder serverSpanThreadBinder() {
return serverSpanThreadBinder;
}
@Nullable
@Override
ServerSpan currentServerSpan() {
return currentServerSpan;
}
@Override
public String toString() {
return "BraveCallable{"
+ "wrappedCallable=" + wrappedCallable + ", "
+ "localSpanThreadBinder=" + localSpanThreadBinder + ", "
+ "currentLocalSpan=" + currentLocalSpan + ", "
+ "serverSpanThreadBinder=" + serverSpanThreadBinder + ", "
+ "currentServerSpan=" + currentServerSpan
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof BraveCallable) {
BraveCallable> that = (BraveCallable>) o;
return (this.wrappedCallable.equals(that.wrappedCallable()))
&& ((this.localSpanThreadBinder == null) ? (that.localSpanThreadBinder() == null) : this.localSpanThreadBinder.equals(that.localSpanThreadBinder()))
&& ((this.currentLocalSpan == null) ? (that.currentLocalSpan() == null) : this.currentLocalSpan.equals(that.currentLocalSpan()))
&& (this.serverSpanThreadBinder.equals(that.serverSpanThreadBinder()))
&& ((this.currentServerSpan == null) ? (that.currentServerSpan() == null) : this.currentServerSpan.equals(that.currentServerSpan()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.wrappedCallable.hashCode();
h *= 1000003;
h ^= (localSpanThreadBinder == null) ? 0 : this.localSpanThreadBinder.hashCode();
h *= 1000003;
h ^= (currentLocalSpan == null) ? 0 : this.currentLocalSpan.hashCode();
h *= 1000003;
h ^= this.serverSpanThreadBinder.hashCode();
h *= 1000003;
h ^= (currentServerSpan == null) ? 0 : this.currentServerSpan.hashCode();
return h;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy