-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.collect.collector.DataCollector,ai.platon.pulsar.common.collect.collector.PriorityDataCollector,kotlin.Comparable
public class PauseDataCollector<E extends Object> extends AbstractPriorityDataCollector<E>
A infinite multi source data collector, the collector always has a chance to collect the next items, and if no item actually collected, wait for a while
-
-
Field Summary
Fields Modifier and Type Field Description private Stringnameprivate final EnilElementprivate final Integernprivate final Durationpauseprivate final Function0<Unit>sleeperprivate final Integercapacityprivate final Integerpriorityprivate final Integeridprivate final Set<String>labelsprivate Stringlangprivate Stringcountryprivate Stringdistrictprivate final Integersizeprivate final IntegerexternalSizeprivate final IntegerestimatedExternalSizeprivate final IntegerestimatedSizeprivate IntegercollectCountprivate IntegercollectedCountprivate final InstantcreateTimeprivate InstantfirstCollectTimeprivate InstantlastCollectedTimeprivate InstantdeadTimeprivate final DurationcollectTimeprivate final BooleanisDead
-
Constructor Summary
Constructors Constructor Description PauseDataCollector(E nilElement, Integer n, Duration pause, Function0<Unit> sleeper, Priority13 priority)
-
Method Summary
-
Methods inherited from class ai.platon.pulsar.common.collect.collector.AbstractPriorityDataCollector
clear, collectTo, collectTo, collectTo, compareTo -
Methods inherited from class ai.platon.pulsar.common.collect.PauseDataCollector
toString -
Methods inherited from class ai.platon.pulsar.common.collect.collector.AbstractDataCollector
deepClear -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PauseDataCollector
PauseDataCollector(E nilElement, Integer n, Duration pause, Function0<Unit> sleeper, Priority13 priority)
-
-
Method Detail
-
getNilElement
final E getNilElement()
-
getSleeper
final Function0<Unit> getSleeper()
-
getCapacity
Integer getCapacity()
The capacity
-
getPriority
Integer getPriority()
-
getCountry
String getCountry()
Required website country
-
setCountry
Unit setCountry(String country)
Required website country
-
getDistrict
String getDistrict()
Required website district
-
setDistrict
Unit setDistrict(String district)
Required website district
-
getExternalSize
Integer getExternalSize()
-
getEstimatedExternalSize
Integer getEstimatedExternalSize()
-
getEstimatedSize
Integer getEstimatedSize()
-
getCollectCount
Integer getCollectCount()
The total count of collect attempt
-
setCollectCount
Unit setCollectCount(Integer collectCount)
The total count of collect attempt
-
getCollectedCount
Integer getCollectedCount()
The total collected count
-
setCollectedCount
Unit setCollectedCount(Integer collectedCount)
The total collected count
-
getCreateTime
Instant getCreateTime()
-
getFirstCollectTime
Instant getFirstCollectTime()
-
setFirstCollectTime
Unit setFirstCollectTime(Instant firstCollectTime)
-
getLastCollectedTime
Instant getLastCollectedTime()
-
setLastCollectedTime
Unit setLastCollectedTime(Instant lastCollectedTime)
-
getDeadTime
Instant getDeadTime()
-
setDeadTime
Unit setDeadTime(Instant deadTime)
-
getCollectTime
Duration getCollectTime()
-
-
-
-