WorkMetricsQuery


@ExperimentalWorkMetricsApi
class WorkMetricsQuery


A specification for querying WorkMetricsInfos.

Each component in a WorkMetricsQuery is AND-ed with the others. Each value in a component is OR-ed.

Summary

Nested types

A builder for WorkMetricsQuery.

Public properties

Long

The start of the enqueue time range filter (inclusive), in milliseconds since epoch (e.g. System.currentTimeMillis).

Long

The end of the enqueue time range filter (inclusive), in milliseconds since epoch (e.g. System.currentTimeMillis).

List<WorkMetricsInfo.State>

The List of WorkMetricsInfo.States being queried.

List<String>

The List of tags being queried.

List<UUID>

The List of androidx.work.WorkRequest ids being queried.

List<String>

The List of worker class names being queried.

Public properties

beginTimeMillis

Added in 2.12.0
val beginTimeMillis: Long

The start of the enqueue time range filter (inclusive), in milliseconds since epoch (e.g. System.currentTimeMillis).

endTimeMillis

Added in 2.12.0
val endTimeMillis: Long

The end of the enqueue time range filter (inclusive), in milliseconds since epoch (e.g. System.currentTimeMillis).

states

Added in 2.12.0
val states: List<WorkMetricsInfo.State>

The List of WorkMetricsInfo.States being queried.

tags

Added in 2.12.0
val tags: List<String>

The List of tags being queried.

workIds

Added in 2.12.0
val workIds: List<UUID>

The List of androidx.work.WorkRequest ids being queried.

workerClassNames

Added in 2.12.0
val workerClassNames: List<String>

The List of worker class names being queried.