Package ai.platon.pulsar.common.collect
Class LoadingUrlPool
-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.collect.UrlPool
public class LoadingUrlPool extends ConcurrentUrlPool
A LoadingUrlPool is a UrlPool, the items can be loaded from external source using loader.
-
-
Field Summary
Fields Modifier and Type Field Description private final UrlCacherealTimeCacheprivate final ExternalUrlLoaderloaderprivate final Integercapacityprivate final Queue<DelayUrl>delayCacheprivate final ConcurrentSkipListMap<Integer, UrlCache>orderedCachesprivate final List<UrlCache>unorderedCachesprivate final Stringidprivate final IntegertotalCountprivate final UrlCachelowestCacheprivate final UrlCachelower5Cacheprivate final UrlCachelower4Cacheprivate final UrlCachelower3Cacheprivate final UrlCachelower2Cacheprivate final UrlCachelowerCacheprivate final UrlCachenormalCacheprivate final UrlCachehigherCacheprivate final UrlCachehigher2Cacheprivate final UrlCachehigher3Cacheprivate final UrlCachehigher4Cacheprivate final UrlCachehigher5Cacheprivate final UrlCachehighestCacheprivate final ImmutableConfigconf
-
Constructor Summary
Constructors Constructor Description LoadingUrlPool(ExternalUrlLoader loader, Integer capacity, ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description UrlCachegetRealTimeCache()The real time url cache in which urls have the highest priority of all. final ExternalUrlLoadergetLoader()final IntegergetCapacity()Unitinitialize()Initialize the url pool -
Methods inherited from class ai.platon.pulsar.common.collect.ConcurrentUrlPool
getDelayCache, getOrderedCaches, getUnorderedCaches -
Methods inherited from class ai.platon.pulsar.common.collect.AbstractUrlPool
add, add, addAll, addAll, clear, getConf, getHigher2Cache, getHigher3Cache, getHigher4Cache, getHigher5Cache, getHigherCache, getHighestCache, getId, getLower2Cache, getLower3Cache, getLower4Cache, getLower5Cache, getLowerCache, getLowestCache, getNormalCache, getTotalCount, hasMore, removeDeceased -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LoadingUrlPool
LoadingUrlPool(ExternalUrlLoader loader, Integer capacity, ImmutableConfig conf)
-
-
Method Detail
-
getRealTimeCache
UrlCache getRealTimeCache()
The real time url cache in which urls have the highest priority of all.
-
getLoader
final ExternalUrlLoader getLoader()
-
getCapacity
final Integer getCapacity()
-
initialize
Unit initialize()
Initialize the url pool
-
-
-
-