Package ai.platon.pulsar.common.collect
Class PauseDataCollector
-
- 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>
-
-
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
Modifier and Type Method Description StringgetName()The collector name UnitsetName(String name)The collector name final EgetNilElement()final IntegergetN()final DurationgetPause()final Function0<Unit>getSleeper()BooleanhasMore()Check if there are more items to collect IntegercollectTo(List<E> sink)Collect an element to the sink List<String>dump()Dump 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
clear, collectTo, collectTo, collectTo, getCollectCount, getCollectTime, getCollectedCount, getCountry, getCreateTime, getDeadTime, getDistrict, getEstimatedExternalSize, getEstimatedSize, getExternalSize, getFirstCollectTime, getId, getLabels, getLang, getLastCollectedTime, getSize, 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
-
-
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()
-
-
-
-