-
- 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
-
getSize
@Synchronized() Integer getSize()
-
getTimeReport
@Synchronized() final String getTimeReport()
-
add
@Synchronized() Boolean add(TaskPool element)
-
offer
@Synchronized() Boolean offer(TaskPool taskPool)
-
poll
@Synchronized() TaskPool poll()
-
peek
@Synchronized() TaskPool peek()
-
remove
@Synchronized() Boolean remove(TaskPool element)
-
isEmpty
@Synchronized() Boolean isEmpty()
-
clear
@Synchronized() Unit clear()
-
enable
@Synchronized() final Unit enable(TaskPool queue)
-
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)
-
find
@Synchronized() final TaskPool find(PoolId id)
-
findExtend
@Synchronized() final TaskPool findExtend(PoolId id)
-
search
@Synchronized() final TaskPool search(PoolId id, Boolean searchInactive)
-
dump
@Synchronized() final Unit dump(Integer limit, Boolean drop)
-
-
-
-