T - The type of the live datapublic abstract class KriptonXLiveDataHandlerImpl<T> extends Object implements LiveDataHandler
It can be invalidated via invalidate(), which will result in a call
to compute() if there are active observers (or when they start
observing)
This is an internal class for now, might be public if we see the necessity.
| Constructor and Description |
|---|
KriptonXLiveDataHandlerImpl()
Creates a computable live data that computes values on the arch IO thread
executor.
|
KriptonXLiveDataHandlerImpl(Executor executor)
Creates a computable live data that computes values on the specified
executor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
compute() |
KriptonXLiveData<T> |
getLiveData()
Returns the LiveData managed by this class.
|
void |
invalidate()
Invalidates the LiveData.
|
public KriptonXLiveDataHandlerImpl()
@NonNull public KriptonXLiveData<T> getLiveData()
public void invalidate()
When there are active observers, this will trigger a call to
compute().
invalidate in interface LiveDataHandler@WorkerThread protected abstract T compute()
Copyright © 2019. All rights reserved.