All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kristofa.brave.AutoValue_BraveRunnable Maven / Gradle / Ivy

There is a newer version: 4.13.6
Show newest version

package com.github.kristofa.brave;

import com.github.kristofa.brave.internal.Nullable;
import com.twitter.zipkin.gen.Span;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_BraveRunnable extends BraveRunnable {

  private final Runnable wrappedRunnable;
  private final LocalSpanThreadBinder localSpanThreadBinder;
  private final Span currentLocalSpan;
  private final ServerSpanThreadBinder serverSpanThreadBinder;
  private final ServerSpan currentServerSpan;

  AutoValue_BraveRunnable(
      Runnable wrappedRunnable,
      @Nullable LocalSpanThreadBinder localSpanThreadBinder,
      @Nullable Span currentLocalSpan,
      ServerSpanThreadBinder serverSpanThreadBinder,
      @Nullable ServerSpan currentServerSpan) {
    if (wrappedRunnable == null) {
      throw new NullPointerException("Null wrappedRunnable");
    }
    this.wrappedRunnable = wrappedRunnable;
    this.localSpanThreadBinder = localSpanThreadBinder;
    this.currentLocalSpan = currentLocalSpan;
    if (serverSpanThreadBinder == null) {
      throw new NullPointerException("Null serverSpanThreadBinder");
    }
    this.serverSpanThreadBinder = serverSpanThreadBinder;
    this.currentServerSpan = currentServerSpan;
  }

  @Override
  Runnable wrappedRunnable() {
    return wrappedRunnable;
  }

  @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 "BraveRunnable{"
        + "wrappedRunnable=" + wrappedRunnable + ", "
        + "localSpanThreadBinder=" + localSpanThreadBinder + ", "
        + "currentLocalSpan=" + currentLocalSpan + ", "
        + "serverSpanThreadBinder=" + serverSpanThreadBinder + ", "
        + "currentServerSpan=" + currentServerSpan
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof BraveRunnable) {
      BraveRunnable that = (BraveRunnable) o;
      return (this.wrappedRunnable.equals(that.wrappedRunnable()))
           && ((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.wrappedRunnable.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