public final class LoaderConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LoaderConfiguration.Builder<TYPE>
Builder of loader configurations.
|
static class |
LoaderConfiguration.CacheStrategyType
Result cache type enumeration.
The cache strategy type indicates what will happen to the result of an invocation after its completion. |
static class |
LoaderConfiguration.ClashResolutionType
Invocation clash resolution enumeration.
The clash of two invocations happens when the same loader ID is already in use at the time of the routine execution. |
static interface |
LoaderConfiguration.Configurable<TYPE>
Interface defining a configurable object.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
AUTO
Constant identifying an loader ID computed from the executor class and the input parameters.
|
static LoaderConfiguration |
DEFAULT_CONFIGURATION
Empty configuration constant.
The configuration has all the values set to their default. |
| Modifier and Type | Method and Description |
|---|---|
static LoaderConfiguration.Builder<LoaderConfiguration> |
builder()
Returns a loader configuration builder.
|
LoaderConfiguration.Builder<LoaderConfiguration> |
builderFrom()
Returns a loader configuration builder initialized with this configuration.
|
static LoaderConfiguration.Builder<LoaderConfiguration> |
builderFrom(LoaderConfiguration initialConfiguration)
Returns a loader configuration builder initialized with the specified configuration.
|
boolean |
equals(Object o) |
LoaderConfiguration.CacheStrategyType |
getCacheStrategyTypeOr(LoaderConfiguration.CacheStrategyType valueIfNotSet)
Returns the type of cache strategy (null by default).
|
LoaderConfiguration.ClashResolutionType |
getClashResolutionTypeOr(LoaderConfiguration.ClashResolutionType valueIfNotSet)
Returns the type of clash resolution (null by default).
|
LoaderConfiguration.ClashResolutionType |
getInputClashResolutionTypeOr(LoaderConfiguration.ClashResolutionType valueIfNotSet)
Returns the type of input clash resolution (null by default).
|
int |
getLoaderIdOr(int valueIfNotSet)
Returns the loader ID (AUTO by default).
|
Looper |
getResultLooperOr(Looper valueIfNotSet)
Returns the looper used for dispatching the results from the loader (null by default).
|
TimeDuration |
getResultStaleTimeOr(TimeDuration valueIfNotSet)
Returns the time after which results are considered to be stale (null by default).
|
int |
hashCode() |
String |
toString() |
public static final int AUTO
public static final LoaderConfiguration DEFAULT_CONFIGURATION
@Nonnull public static LoaderConfiguration.Builder<LoaderConfiguration> builder()
@Nonnull public static LoaderConfiguration.Builder<LoaderConfiguration> builderFrom(@Nullable LoaderConfiguration initialConfiguration)
initialConfiguration - the initial loader configuration.@Nonnull public LoaderConfiguration.Builder<LoaderConfiguration> builderFrom()
public LoaderConfiguration.CacheStrategyType getCacheStrategyTypeOr(@Nullable LoaderConfiguration.CacheStrategyType valueIfNotSet)
valueIfNotSet - the default value if none was set.public LoaderConfiguration.ClashResolutionType getClashResolutionTypeOr(@Nullable LoaderConfiguration.ClashResolutionType valueIfNotSet)
valueIfNotSet - the default value if none was set.public LoaderConfiguration.ClashResolutionType getInputClashResolutionTypeOr(@Nullable LoaderConfiguration.ClashResolutionType valueIfNotSet)
valueIfNotSet - the default value if none was set.public int getLoaderIdOr(int valueIfNotSet)
valueIfNotSet - the default value if none was set.public Looper getResultLooperOr(@Nullable Looper valueIfNotSet)
valueIfNotSet - the default value if none was set.public TimeDuration getResultStaleTimeOr(@Nullable TimeDuration valueIfNotSet)
valueIfNotSet - the default value if none was set.