Enum Class ObservationRequestTracker

java.lang.Object
java.lang.Enum<ObservationRequestTracker>
org.springframework.data.cassandra.observability.ObservationRequestTracker
All Implemented Interfaces:
com.datastax.oss.driver.api.core.tracker.RequestTracker, Serializable, AutoCloseable, Comparable<ObservationRequestTracker>, Constable

public enum ObservationRequestTracker extends Enum<ObservationRequestTracker> implements com.datastax.oss.driver.api.core.tracker.RequestTracker
Trace implementation of the RequestTracker.
Since:
4.0
Author:
Mark Paluch, Marcin Grzejszczak
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Singleton instance of the RequestTracker to complete Observations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    onError(com.datastax.oss.driver.api.core.session.Request request, Throwable error, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
     
    void
    onNodeError(com.datastax.oss.driver.api.core.session.Request request, Throwable error, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
     
    void
    onNodeSuccess(com.datastax.oss.driver.api.core.session.Request request, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
     
    void
    onSuccess(com.datastax.oss.driver.api.core.session.Request request, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.datastax.oss.driver.api.core.tracker.RequestTracker

    onError, onNodeError, onNodeSuccess, onSessionReady, onSuccess
  • Enum Constant Details

    • INSTANCE

      public static final ObservationRequestTracker INSTANCE
      Singleton instance of the RequestTracker to complete Observations.
  • Method Details

    • values

      public static ObservationRequestTracker[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ObservationRequestTracker valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • onSuccess

      public void onSuccess(com.datastax.oss.driver.api.core.session.Request request, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
      Specified by:
      onSuccess in interface com.datastax.oss.driver.api.core.tracker.RequestTracker
    • onError

      public void onError(com.datastax.oss.driver.api.core.session.Request request, Throwable error, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, @Nullable com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
      Specified by:
      onError in interface com.datastax.oss.driver.api.core.tracker.RequestTracker
    • onNodeError

      public void onNodeError(com.datastax.oss.driver.api.core.session.Request request, Throwable error, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
      Specified by:
      onNodeError in interface com.datastax.oss.driver.api.core.tracker.RequestTracker
    • onNodeSuccess

      public void onNodeSuccess(com.datastax.oss.driver.api.core.session.Request request, long latencyNanos, com.datastax.oss.driver.api.core.config.DriverExecutionProfile executionProfile, com.datastax.oss.driver.api.core.metadata.Node node, String requestLogPrefix)
      Specified by:
      onNodeSuccess in interface com.datastax.oss.driver.api.core.tracker.RequestTracker
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception