org.apache.cassandra.tracing

## Class TraceState

- java.lang.Object
- - org.apache.cassandra.tracing.TraceState

Direct Known Subclasses:
  ExpiredTraceState

    public class TraceState
    extends java.lang.Object

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 Summary

Fields
`java.net.InetAddress` `coordinator`
`java.util.UUID` `sessionId`
`java.nio.ByteBuffer` `sessionIdBytes`
`com.google.common.base.Stopwatch` `watch`

### Constructor Summary

Constructors
Constructor and Description
`TraceState(java.net.InetAddress coordinator, java.util.UUID sessionId)`

### Method Summary

Methods
`boolean` `acquireReference()`
`int` `elapsed()`
`int` `releaseReference()`
`static void` `trace(java.nio.ByteBuffer sessionIdBytes, java.lang.String message, int elapsed)`
`void` `trace(java.lang.String message)`
`void` `trace(java.lang.String format, java.lang.Object arg)`
`void` `trace(java.lang.String format, java.lang.Object[] args)`
`void` `trace(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sessionId

    public final java.util.UUID sessionId

#### coordinator

    public final java.net.InetAddress coordinator

#### watch

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

#### sessionIdBytes

    public final java.nio.ByteBuffer sessionIdBytes

### Constructor Detail

#### TraceState

    public TraceState(java.net.InetAddress coordinator,
              java.util.UUID sessionId)

### Method Detail

#### elapsed

    public int elapsed()

#### trace

    public void trace(java.lang.String format,
             java.lang.Object arg)

#### trace

    public void trace(java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

#### trace

    public void trace(java.lang.String format,
             java.lang.Object[] args)

#### trace

    public void trace(java.lang.String message)

#### trace

    public static void trace(java.nio.ByteBuffer sessionIdBytes,
             java.lang.String message,
             int elapsed)

#### acquireReference

    public boolean acquireReference()

#### releaseReference

    public int releaseReference()