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

io.sentry.internal.eventprocessor.EventProcessorAndOrder Maven / Gradle / Ivy

There is a newer version: 8.0.0-rc.4
Show newest version
package io.sentry.internal.eventprocessor;

import io.sentry.EventProcessor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class EventProcessorAndOrder implements Comparable {

  private final @NotNull EventProcessor eventProcessor;
  private final @NotNull Long order;

  public EventProcessorAndOrder(
      final @NotNull EventProcessor eventProcessor, final @Nullable Long order) {
    this.eventProcessor = eventProcessor;
    if (order == null) {
      this.order = System.nanoTime();
    } else {
      this.order = order;
    }
  }

  public @NotNull EventProcessor getEventProcessor() {
    return eventProcessor;
  }

  public @NotNull Long getOrder() {
    return order;
  }

  @Override
  public int compareTo(@NotNull EventProcessorAndOrder o) {
    return order.compareTo(o.order);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy