Interface DataCollector
-
- All Implemented Interfaces:
public interface DataCollector<T extends Object>The data collector interface
-
-
Method Summary
Modifier and Type Method Description BooleanhasMore()Check if there are more items to collect abstract IntegercollectTo(T element, List<T> sink)Collect an element to the sink abstract IntegercollectTo(Integer index, T element, List<T> sink)Collect an element to the sink abstract IntegercollectTo(List<T> sink)Collect an element to the sink abstract IntegercollectTo(Integer index, List<T> sink)Collect an element to the sink abstract List<String>dump()Dump the collector abstract Unitclear()Clear the collector UnitdeepClear()Clear the collector both from the local cache and the external source abstract IntegergetId()The collector id abstract StringgetName()The collector name abstract UnitsetName(String name)The collector name abstract Set<String>getLabels()The collector labels abstract StringgetLang()Required website language abstract StringgetCountry()Required website country abstract StringgetDistrict()Required website district abstract IntegergetCapacity()The collector cache capacity. abstract IntegergetSize()abstract IntegergetExternalSize()abstract IntegergetEstimatedSize()abstract IntegergetEstimatedExternalSize()abstract IntegergetCollectCount()The count of all collect attempts abstract IntegergetCollectedCount()The count of all collected items abstract InstantgetCreateTime()The time point collector is created abstract InstantgetFirstCollectTime()The first collect time abstract InstantgetLastCollectedTime()The last time to collect an item successfully abstract DurationgetCollectTime()The time between the first collect and the last collect abstract InstantgetDeadTime()The dead time of this collector, if the collector is dead, all items should be dropped BooleanisDead()-
-
Method Detail
-
collectTo
abstract Integer collectTo(Integer index, T element, List<T> sink)
Collect an element to the sink
-
getCountry
abstract String getCountry()
Required website country
-
getDistrict
abstract String getDistrict()
Required website district
-
getCapacity
abstract Integer getCapacity()
The collector cache capacity. At most capacity items can be collected to the cache from the source
-
getExternalSize
abstract Integer getExternalSize()
-
getEstimatedSize
abstract Integer getEstimatedSize()
-
getEstimatedExternalSize
abstract Integer getEstimatedExternalSize()
-
getCollectCount
abstract Integer getCollectCount()
The count of all collect attempts
-
getCollectedCount
abstract Integer getCollectedCount()
The count of all collected items
-
getCreateTime
abstract Instant getCreateTime()
The time point collector is created
-
getFirstCollectTime
abstract Instant getFirstCollectTime()
The first collect time
-
getLastCollectedTime
abstract Instant getLastCollectedTime()
The last time to collect an item successfully
-
getCollectTime
abstract Duration getCollectTime()
The time between the first collect and the last collect
-
getDeadTime
abstract Instant getDeadTime()
The dead time of this collector, if the collector is dead, all items should be dropped
-
-
-
-