# TrackDescriptor

Artifact: [androidx.tracing:tracing](https://developer.android.com/jetpack/androidx/releases/tracing) [View Source](https://cs.android.com/search?q=file:androidx/tracing/TrackDescriptor.kt+class:androidx.tracing.TrackDescriptor) Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

*** ** * ** ***


```
public final class TrackDescriptor
```

<br />

*** ** * ** ***

Low level representation of a Track, written once to the Trace.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#TrackDescriptor(kotlin.String,kotlin.Long,kotlin.Long,kotlin.Int,kotlin.Int,kotlin.Long)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, long uuid, long parentUuid, int type, int pid, long tid )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getName()()` Display name of the Track in the trace. |
| `final long` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getParentUuid()()` If set, this Track will be nested inside of the parent track (for example, when a `https://developer.android.com/reference/androidx/tracing/ThreadTrack` is a child of a `https://developer.android.com/reference/androidx/tracing/ProcessTrack`). |
| `final int` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getPid()()` If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`, represents the PID of the process. |
| `final long` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getTid()()` If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, represents the TID of the thread. |
| `final int` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getType()()` One of `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_COUNTER()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()` |
| `final long` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#getUuid()()` Unique ID of the Track - each corresponding `https://developer.android.com/reference/androidx/tracing/TraceEvent` in the trace will set `https://developer.android.com/reference/androidx/tracing/TraceEvent#trackUuid()` to this value. |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setName(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value)` Display name of the Track in the trace. |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setParentUuid(kotlin.Long)(long value)` If set, this Track will be nested inside of the parent track (for example, when a `https://developer.android.com/reference/androidx/tracing/ThreadTrack` is a child of a `https://developer.android.com/reference/androidx/tracing/ProcessTrack`). |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setPid(kotlin.Int)(int value)` If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`, represents the PID of the process. |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setTid(kotlin.Long)(long value)` If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, represents the TID of the thread. |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setType(kotlin.Int)(int value)` One of `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_COUNTER()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()` |
| `final void` | `https://developer.android.com/reference/androidx/tracing/TrackDescriptor#setUuid(kotlin.Long)(long value)` Unique ID of the Track - each corresponding `https://developer.android.com/reference/androidx/tracing/TraceEvent` in the trace will set `https://developer.android.com/reference/androidx/tracing/TraceEvent#trackUuid()` to this value. |

## Public constructors

### TrackDescriptor

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public TrackDescriptor(
    @NonNull String name,
    long uuid,
    long parentUuid,
    int type,
    int pid,
    long tid
)
```

## Public methods

### getName

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final @NonNull String getName()
```

Display name of the Track in the trace.

### getParentUuid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final long getParentUuid()
```

If set, this Track will be nested inside of the parent track (for example, when a `https://developer.android.com/reference/androidx/tracing/ThreadTrack` is a child of a `https://developer.android.com/reference/androidx/tracing/ProcessTrack`).

### getPid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final int getPid()
```

If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`, represents the PID of the process.

### getTid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final long getTid()
```

If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, represents the TID of the thread.

### getType

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final int getType()
```

One of `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_COUNTER()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`

### getUuid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final long getUuid()
```

Unique ID of the Track - each corresponding `https://developer.android.com/reference/androidx/tracing/TraceEvent` in the trace will set `https://developer.android.com/reference/androidx/tracing/TraceEvent#trackUuid()` to this value.

### setName

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setName(@NonNull String value)
```

Display name of the Track in the trace.

### setParentUuid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setParentUuid(long value)
```

If set, this Track will be nested inside of the parent track (for example, when a `https://developer.android.com/reference/androidx/tracing/ThreadTrack` is a child of a `https://developer.android.com/reference/androidx/tracing/ProcessTrack`).

### setPid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setPid(int value)
```

If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`, represents the PID of the process.

### setTid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setTid(long value)
```

If type == `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, represents the TID of the thread.

### setType

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setType(int value)
```

One of `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_THREAD()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_COUNTER()`, `https://developer.android.com/reference/androidx/tracing/package-summary#TRACK_DESCRIPTOR_TYPE_PROCESS()`

### setUuid

Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

```
public final void setUuid(long value)
```

Unique ID of the Track - each corresponding `https://developer.android.com/reference/androidx/tracing/TraceEvent` in the trace will set `https://developer.android.com/reference/androidx/tracing/TraceEvent#trackUuid()` to this value.