T - The type of the value do computepublic abstract class ComputableLiveData<T>
extends <any>
LiveData to make it possible compute something on the WorkerThread, and abort or invalidate if needed
Will compute the value only when it has at least one observer, in other words, if the liveData instance is active
| Constructor and Description |
|---|
ComputableLiveData() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasComputed() |
void |
interrupt()
Interrupt the ongoing computing Thread and call
abort() |
void |
invalidate()
Invalidate the actual data and compute again
|
boolean |
isRunning() |
boolean |
isRunningOrHasComputed() |
protected void |
onActive() |
public boolean isRunning()
public boolean hasComputed()
public boolean isRunningOrHasComputed()
isRunning(),
hasComputed()public void invalidate()
public void interrupt()
abort()protected void onActive()