Class Loader

    • Constructor Detail

      • Loader

        public Loader​(String threadNameSuffix)
        Deprecated.
        Parameters:
        threadNameSuffix - A name suffix for the loader's thread. This should be the name of the component using the loader.
    • Method Detail

      • createRetryAction

        public static Loader.LoadErrorAction createRetryAction​(boolean resetErrorCount,
                                                               long retryDelayMillis)
        Deprecated.
        Creates a Loader.LoadErrorAction for retrying with the given parameters.
        Parameters:
        resetErrorCount - Whether the previous error count should be set to zero.
        retryDelayMillis - The number of milliseconds to wait before retrying.
        Returns:
        A Loader.LoadErrorAction for retrying with the given parameters.
      • clearFatalError

        public void clearFatalError()
        Deprecated.
        Clears any stored fatal error.
      • isLoading

        public boolean isLoading()
        Deprecated.
        Returns whether the loader is currently loading.
      • cancelLoading

        public void cancelLoading()
        Deprecated.
        Cancels the current load.
        Throws:
        IllegalStateException - If the loader is not currently loading.
      • release

        public void release()
        Deprecated.
        Releases the loader. This method should be called when the loader is no longer required.
      • release

        public void release​(@Nullable
                            Loader.ReleaseCallback callback)
        Deprecated.
        Releases the loader. This method should be called when the loader is no longer required.
        Parameters:
        callback - An optional callback to be called on the loading thread once the loader has been released.
      • maybeThrowError

        public void maybeThrowError​(int minRetryCount)
                             throws IOException
        Deprecated.
        Description copied from interface: LoaderErrorThrower
        Throws a fatal error, or a non-fatal error if loading is currently backed off and the current Loader.Loadable has incurred a number of errors greater than the specified minimum number of retries. Else does nothing.
        Specified by:
        maybeThrowError in interface LoaderErrorThrower
        Parameters:
        minRetryCount - A minimum retry count that must be exceeded for a non-fatal error to be thrown. Should be non-negative.
        Throws:
        IOException - The error.