Package com.inmobi.commons.core
Class AsyncRefreshableProperty
-
- All Implemented Interfaces:
-
kotlin.properties.ReadOnlyProperty
public final class AsyncRefreshableProperty<T extends Object> implements ReadOnlyProperty<Any, T>
This is a Delegated property implementation for variable which have async get() get() will give stale value depends on how old depends on various refresh options refreshOnGet, refreshOnInt are available to configure when to fetch new value refreshLogic() - to be run on background thread of normalExecutor.
-
-
Constructor Summary
Constructors Constructor Description AsyncRefreshableProperty(T defaultValue, Function0<T> refreshLogic, Boolean refreshOnGet, Boolean refreshOnInit)
-