Interface UrlPool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classUrlPool.Companion
-
Method Summary
Modifier and Type Method Description abstract Unitinitialize()Initialize the url pool abstract Booleanadd(String url, Priority13 priority)Add a url to the pool abstract Booleanadd(UrlAware url)Add a url to the pool abstract BooleanaddAll(Iterable<String> urls, Priority13 priority)Add urls to the pool abstract BooleanaddAll(Iterable<UrlAware> urls)Add urls to the pool abstract UnitremoveDeceased()Remove deceased urls, such as URLs that are past the deadline. abstract Unitclear()Clear the pool abstract BooleanhasMore()Check if there is more items in the url pool abstract StringgetId()abstract UrlCachegetRealTimeCache()The real time url cache in which urls have the highest priority of all. abstract Queue<DelayUrl>getDelayCache()An unbounded queue of Delayed urls, in which an element can only be taken when its delay has expired. abstract Map<Integer, UrlCache>getOrderedCaches()The ordered url caches. abstract List<UrlCache>getUnorderedCaches()The unordered url caches, tasks in unordered caches have the lowest priority. abstract IntegergetTotalCount()Total number of items in all url caches. abstract UrlCachegetLowestCache()A shortcut to the cache with the lowest priority in the ordered caches abstract UrlCachegetLower5Cache()A shortcut to the cache that is 5 priority lower than the normal cache in the ordered caches. abstract UrlCachegetLower4Cache()A shortcut to the cache that is 4 priority lower than the normal cache in the ordered caches. abstract UrlCachegetLower3Cache()A shortcut to the cache that is 3 priority lower than the normal cache in the ordered caches. abstract UrlCachegetLower2Cache()A shortcut to the cache that is 2 priority lower than the normal cache in the ordered caches. abstract UrlCachegetLowerCache()A shortcut to the cache that is 1 priority lower than the normal cache in the ordered caches. abstract UrlCachegetNormalCache()A shortcut to the cache has the default priority in the ordered caches. abstract UrlCachegetHigherCache()A shortcut to the cache that is 1 priority higher than the normal cache in the ordered caches. abstract UrlCachegetHigher2Cache()A shortcut to the cache that is 2 priority higher than the normal cache in the ordered caches. abstract UrlCachegetHigher3Cache()A shortcut to the cache that is 3 priority higher than the normal cache in the ordered caches. abstract UrlCachegetHigher4Cache()A shortcut to the cache that is 4 priority higher than the normal cache in the ordered caches. abstract UrlCachegetHigher5Cache()A shortcut to the cache that is 5 priority higher than the normal cache in the ordered caches. abstract UrlCachegetHighestCache()A shortcut to the cache with the highest priority in the ordered caches. -
-
Method Detail
-
initialize
abstract Unit initialize()
Initialize the url pool
-
add
abstract Boolean add(String url, Priority13 priority)
Add a url to the pool
-
addAll
abstract Boolean addAll(Iterable<String> urls, Priority13 priority)
Add urls to the pool
-
removeDeceased
abstract Unit removeDeceased()
Remove deceased urls, such as URLs that are past the deadline.
-
getRealTimeCache
abstract UrlCache getRealTimeCache()
The real time url cache in which urls have the highest priority of all.
-
getDelayCache
abstract Queue<DelayUrl> getDelayCache()
An unbounded queue of Delayed urls, in which an element can only be taken when its delay has expired.
Delay cache has higher priority than all ordered caches and is usually used for retrying tasks.
-
getOrderedCaches
abstract Map<Integer, UrlCache> getOrderedCaches()
The ordered url caches.
Ordered caches has higher priority than unordered caches.
-
getUnorderedCaches
abstract List<UrlCache> getUnorderedCaches()
The unordered url caches, tasks in unordered caches have the lowest priority.
Unordered caches has the lowest priority of all
-
getTotalCount
abstract Integer getTotalCount()
Total number of items in all url caches.
-
getLowestCache
abstract UrlCache getLowestCache()
A shortcut to the cache with the lowest priority in the ordered caches
-
getLower5Cache
abstract UrlCache getLower5Cache()
A shortcut to the cache that is 5 priority lower than the normal cache in the ordered caches.
-
getLower4Cache
abstract UrlCache getLower4Cache()
A shortcut to the cache that is 4 priority lower than the normal cache in the ordered caches.
-
getLower3Cache
abstract UrlCache getLower3Cache()
A shortcut to the cache that is 3 priority lower than the normal cache in the ordered caches.
-
getLower2Cache
abstract UrlCache getLower2Cache()
A shortcut to the cache that is 2 priority lower than the normal cache in the ordered caches.
-
getLowerCache
abstract UrlCache getLowerCache()
A shortcut to the cache that is 1 priority lower than the normal cache in the ordered caches.
-
getNormalCache
abstract UrlCache getNormalCache()
A shortcut to the cache has the default priority in the ordered caches.
-
getHigherCache
abstract UrlCache getHigherCache()
A shortcut to the cache that is 1 priority higher than the normal cache in the ordered caches.
-
getHigher2Cache
abstract UrlCache getHigher2Cache()
A shortcut to the cache that is 2 priority higher than the normal cache in the ordered caches.
-
getHigher3Cache
abstract UrlCache getHigher3Cache()
A shortcut to the cache that is 3 priority higher than the normal cache in the ordered caches.
-
getHigher4Cache
abstract UrlCache getHigher4Cache()
A shortcut to the cache that is 4 priority higher than the normal cache in the ordered caches.
-
getHigher5Cache
abstract UrlCache getHigher5Cache()
A shortcut to the cache that is 5 priority higher than the normal cache in the ordered caches.
-
getHighestCache
abstract UrlCache getHighestCache()
A shortcut to the cache with the highest priority in the ordered caches.
-
-
-
-