Class RequestTracker

java.lang.Object
com.bumptech.glide.manager.RequestTracker

public class RequestTracker extends Object
A class for tracking, canceling, and restarting in progress, completed, and failed requests.

This class is not thread safe and must be accessed on the main thread.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Stops tracking the given request, clears, and recycles it, and returns true if the request was removed or invalid or false if the request was not found.
    void
    Cancels all requests and clears their resources.
    boolean
    Returns true if requests are currently paused, and false otherwise.
    void
    Stops any in progress requests and releases bitmaps associated with completed requests.
    void
    Stops any in progress requests.
    void
    Restarts failed requests and cancels and restarts in progress requests.
    void
    Starts any not yet completed or failed requests.
    void
    Starts tracking the given request.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RequestTracker

      public RequestTracker()
  • Method Details

    • runRequest

      public void runRequest(@NonNull Request request)
      Starts tracking the given request.
    • clearAndRemove

      public boolean clearAndRemove(@Nullable Request request)
      Stops tracking the given request, clears, and recycles it, and returns true if the request was removed or invalid or false if the request was not found.
    • isPaused

      public boolean isPaused()
      Returns true if requests are currently paused, and false otherwise.
    • pauseRequests

      public void pauseRequests()
      Stops any in progress requests.
    • pauseAllRequests

      public void pauseAllRequests()
      Stops any in progress requests and releases bitmaps associated with completed requests.
    • resumeRequests

      public void resumeRequests()
      Starts any not yet completed or failed requests.
    • clearRequests

      public void clearRequests()
      Cancels all requests and clears their resources.

      After this call requests cannot be restarted.

    • restartRequests

      public void restartRequests()
      Restarts failed requests and cancels and restarts in progress requests.
    • toString

      public String toString()
      Overrides:
      toString in class Object