-
- All Implemented Interfaces:
-
java.util.Queue,kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.MutableCollection,kotlin.collections.MutableIterable
public final class PoolQueue extends AbstractQueue<TaskPool>
Created by vincent on 16-9-22. Copyright @ 2013-2016 Platon AI. All rights reserved
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPoolQueue.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integersizeprivate final StringtimeReport
-
Constructor Summary
Constructors Constructor Description PoolQueue()
-
Method Summary
Modifier and Type Method Description IntegergetSize()final StringgetTimeReport()Booleanadd(TaskPool element)Booleanoffer(TaskPool taskPool)TaskPoolpoll()TaskPoolpeek()Booleanremove(TaskPool element)Iterator<TaskPool>iterator()BooleanisEmpty()Unitclear()final Unitenable(TaskPool queue)final Unitdisable(TaskPool pool)Retired queues do not serve any more, but the tasks can be find out and finished. final BooleanhasPriorPendingTasks(Integer priority)final TaskPoolfind(PoolId id)final TaskPoolfindExtend(PoolId id)final TaskPoolsearch(PoolId id, Boolean searchInactive)final Unitdump(Integer limit, Boolean drop)-
Methods inherited from class ai.platon.pulsar.crawl.fetch.batch.data.PoolQueue
addAll, element, remove -
Methods inherited from class java.util.AbstractQueue
contains, containsAll, removeAll, retainAll, toArray, toArray, toString -
Methods inherited from class kotlin.collections.Collection
forEach -
Methods inherited from class kotlin.collections.MutableCollection
parallelStream, spliterator, stream, toArray -
Methods inherited from class java.util.AbstractCollection
removeIf -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getTimeReport
@Synchronized() final String getTimeReport()
-
clear
@Synchronized() Unit clear()
-
disable
@Synchronized() final Unit disable(TaskPool pool)
Retired queues do not serve any more, but the tasks can be find out and finished. The tasks in detached queues can be find out to finish.
A queue should be detached if
the queue is too slow, or
all tasks are done
-
hasPriorPendingTasks
@Synchronized() final Boolean hasPriorPendingTasks(Integer priority)
-
findExtend
@Synchronized() final TaskPool findExtend(PoolId id)
-
-
-
-