Class TraceState

java.lang.Object
org.apache.cassandra.tracing.TraceState
All Implemented Interfaces:
ProgressEventNotifier
Direct Known Subclasses:
TraceStateImpl

public abstract class TraceState extends Object implements ProgressEventNotifier
ThreadLocal state for a tracing session. The presence of an instance of this class as a ThreadLocal denotes that an operation is being traced.
  • Field Details

    • sessionId

      public final TimeUUID sessionId
    • coordinator

      public final InetAddressAndPort coordinator
    • watch

      public final com.google.common.base.Stopwatch watch
    • sessionIdBytes

      public final ByteBuffer sessionIdBytes
    • traceType

      public final Tracing.TraceType traceType
    • ttl

      public final int ttl
  • Constructor Details

  • Method Details

    • enableActivityNotification

      public void enableActivityNotification(String tag)
      Activate notification with provided tag name.
      Parameters:
      tag - Tag name to add when emitting notification
    • addProgressListener

      public void addProgressListener(ProgressListener listener)
      Description copied from interface: ProgressEventNotifier
      Register progress listener to this publisher.
      Specified by:
      addProgressListener in interface ProgressEventNotifier
      Parameters:
      listener - listener to register.
    • removeProgressListener

      public void removeProgressListener(ProgressListener listener)
      Description copied from interface: ProgressEventNotifier
      Remove progress listener from this publisher.
      Specified by:
      removeProgressListener in interface ProgressEventNotifier
      Parameters:
      listener - listener to remove
    • elapsed

      public int elapsed()
    • stop

      public void stop()
    • waitActivity

      public TraceState.Status waitActivity(long timeout)
    • notifyActivity

      protected void notifyActivity()
    • trace

      public void trace(String format, Object arg)
    • trace

      public void trace(String format, Object arg1, Object arg2)
    • trace

      public void trace(String format, Object... args)
    • trace

      public void trace(String message)
    • traceImpl

      protected abstract void traceImpl(String message)
    • waitForPendingEvents

      protected void waitForPendingEvents()
    • acquireReference

      public boolean acquireReference()
    • releaseReference

      public int releaseReference()