public class RequestTracker extends Object
This class is not thread safe and must be accessed on the main thread.
Constructor and Description |
---|
RequestTracker() |
Modifier and Type | Method and Description |
---|---|
boolean |
clearRemoveAndRecycle(Request request)
Stops tracking the given request, clears, and recycles it, and returns
true if the
request was removed or false if the request was not found. |
void |
clearRequests()
Cancels all requests and clears their resources.
|
boolean |
isPaused()
Returns
true if requests are currently paused, and false otherwise. |
void |
pauseRequests()
Stops any in progress requests.
|
void |
restartRequests()
Restarts failed requests and cancels and restarts in progress requests.
|
void |
resumeRequests()
Starts any not yet completed or failed requests.
|
void |
runRequest(Request request)
Starts tracking the given request.
|
String |
toString() |
public void runRequest(Request request)
public boolean clearRemoveAndRecycle(Request request)
true
if the
request was removed or false
if the request was not found.public boolean isPaused()
true
if requests are currently paused, and false
otherwise.public void pauseRequests()
public void resumeRequests()
public void clearRequests()
After this call requests cannot be restarted.
public void restartRequests()