T - The type of the live datapublic abstract class KriptonPagedLiveDataHandlerImpl<T> extends Object implements LiveDataHandler
This is an internal class for now, might be public if we see the necessity.
| Constructor and Description |
|---|
KriptonPagedLiveDataHandlerImpl(PagedResult pagedResult)
Creates a computable live data which is computed when there are active
observers.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
compute()
Compute.
|
PagedLiveData<T> |
getLiveData()
Returns the LiveData managed by this class.
|
void |
invalidate()
Invalidates the LiveData.
|
public KriptonPagedLiveDataHandlerImpl(PagedResult pagedResult)
It can also be invalidated via invalidate() which will result in
a call to compute() if there are active observers (or when they
start observing)
@NonNull public PagedLiveData<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.