WorkInfo
public
final
class
WorkInfo
extends Object
java.lang.Object | |
↳ | androidx.work.WorkInfo |
Information about a particular WorkRequest
containing the id of the WorkRequest, its
current WorkInfo.State
, output, tags, and run attempt count. Note that output is only available
for the terminal states (WorkInfo.State.SUCCEEDED
and WorkInfo.State.FAILED
).
Summary
Nested classes | |
---|---|
enum |
WorkInfo.State
The current lifecycle state of a |
Public methods | |
---|---|
boolean
|
equals(Object o)
|
UUID
|
getId()
Gets the identifier of the |
Data
|
getOutputData()
Gets the output |
Data
|
getProgress()
Gets the progress |
int
|
getRunAttemptCount()
Gets the run attempt count of the |
WorkInfo.State
|
getState()
Gets the current |
Set<String>
|
getTags()
Gets the |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
---|---|
Public methods
equals
public boolean equals (Object o)
Parameters | |
---|---|
o |
Object |
Returns | |
---|---|
boolean |
getId
public UUID getId ()
Gets the identifier of the WorkRequest
.
Returns | |
---|---|
UUID |
The identifier of a WorkRequest
|
getOutputData
public Data getOutputData ()
Gets the output Data
for the WorkRequest
. If the WorkRequest is unfinished,
this is always Data.EMPTY
.
Returns | |
---|---|
Data |
The output Data of the WorkRequest
|
getProgress
public Data getProgress ()
Gets the progress Data
associated with the WorkRequest
.
Returns | |
---|---|
Data |
The progress Data associated with the WorkRequest
|
getRunAttemptCount
public int getRunAttemptCount ()
Gets the run attempt count of the WorkRequest
. Note that for
PeriodicWorkRequest
s, the run attempt count gets reset between successful runs.
Returns | |
---|---|
int |
The run attempt count of the WorkRequest .
|
getState
public WorkInfo.State getState ()
Gets the current WorkInfo.State
of the WorkRequest
.
Returns | |
---|---|
WorkInfo.State |
The current WorkInfo.State of the WorkRequest
|
getTags
public Set<String> getTags ()
Gets the Set
of tags associated with the WorkRequest
.
Returns | |
---|---|
Set<String> |
The Set of tags associated with the WorkRequest
|
hashCode
public int hashCode ()
Returns | |
---|---|
int |
toString
public String toString ()
Returns | |
---|---|
String |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-24 UTC.