Package ai.platon.pulsar.common.collect
Class DelayCacheCollector
-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.collect.collector.DataCollector,ai.platon.pulsar.common.collect.collector.PriorityDataCollector,kotlin.Comparable
public class DelayCacheCollector extends AbstractPriorityDataCollector<UrlAware>
-
-
Field Summary
Fields Modifier and Type Field Description private Stringnameprivate final Integersizeprivate final Queue<DelayUrl>queueprivate final Integercapacityprivate final Integerpriorityprivate final Integeridprivate final Set<String>labelsprivate Stringlangprivate Stringcountryprivate Stringdistrictprivate final IntegerexternalSizeprivate final IntegerestimatedExternalSizeprivate final IntegerestimatedSizeprivate IntegercollectCountprivate IntegercollectedCountprivate final InstantcreateTimeprivate InstantfirstCollectTimeprivate InstantlastCollectedTimeprivate InstantdeadTimeprivate final DurationcollectTimeprivate final BooleanisDead
-
Constructor Summary
Constructors Constructor Description DelayCacheCollector(Queue<DelayUrl> queue, Priority13 priority)DelayCacheCollector(Queue<DelayUrl> queue, Integer priority)
-
Method Summary
Modifier and Type Method Description StringgetName()The collector name UnitsetName(String name)The collector name IntegergetSize()final Queue<DelayUrl>getQueue()BooleanhasMore()Check if there are more items to collect IntegercollectTo(List<UrlAware> sink)Collect an element to the sink List<String>dump()Dump the collector Unitclear()Clear the collector -
Methods inherited from class ai.platon.pulsar.common.collect.collector.AbstractPriorityDataCollector
getCapacity, getPriority, toString -
Methods inherited from class ai.platon.pulsar.common.collect.collector.AbstractDataCollector
collectTo, collectTo, collectTo, getCollectCount, getCollectTime, getCollectedCount, getCountry, getCreateTime, getDeadTime, getDistrict, getEstimatedExternalSize, getEstimatedSize, getExternalSize, getFirstCollectTime, getId, getLabels, getLang, getLastCollectedTime, setCollectCount, setCollectedCount, setCountry, setDeadTime, setDistrict, setFirstCollectTime, setLang, setLastCollectedTime -
Methods inherited from class ai.platon.pulsar.common.collect.collector.DataCollector
deepClear, isDead -
Methods inherited from class ai.platon.pulsar.common.collect.collector.PriorityDataCollector
compareTo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
hasMore
@Synchronized() Boolean hasMore()
Check if there are more items to collect
-
collectTo
@Synchronized() Integer collectTo(List<UrlAware> sink)
Collect an element to the sink
-
dump
@Synchronized() List<String> dump()
Dump the collector
-
-
-
-