public class FileDownloadSerialQueue
extends java.lang.Object
| Constructor and Description |
|---|
FileDownloadSerialQueue() |
FileDownloadSerialQueue(com.liulishuo.okdownload.DownloadSerialQueue serialQueue,
com.liulishuo.okdownload.UnifiedListenerManager listenerManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
enqueue(BaseDownloadTask task)
Enqueues the given task sometime in the serial queue.
|
int |
getWaitingTaskCount()
Get the count of tasks which is waiting on this queue.
|
int |
getWorkingTaskId()
Returns the identify of the working task, if there is task is working, you will receive
DownloadSerialQueue.ID_INVALID. |
void |
pause()
Pause the queue.
|
void |
resume()
Resume the queue if the queue is paused.
|
java.util.List<BaseDownloadTask> |
shutdown()
Attempts to stop the working task, halts the processing of waiting tasks, and returns a list
of the tasks that were awaiting execution.
|
public FileDownloadSerialQueue()
public FileDownloadSerialQueue(@NonNull
com.liulishuo.okdownload.DownloadSerialQueue serialQueue,
@NonNull
com.liulishuo.okdownload.UnifiedListenerManager listenerManager)
public void enqueue(BaseDownloadTask task)
task is in the head of
the serial queue, the task will be started automatically.public void pause()
resume()public void resume()
pause()public int getWorkingTaskId()
DownloadSerialQueue.ID_INVALID.public int getWaitingTaskCount()
public java.util.List<BaseDownloadTask> shutdown()