-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.collect.UrlCache
public abstract class AbstractUrlCache implements UrlCache
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Integerpriorityprivate final Queue<UrlAware>nonReentrantQueueprivate final Queue<UrlAware>nReentrantQueueprivate final Queue<UrlAware>reentrantQueueprivate final List<Queue<UrlAware>>queuesprivate final Integersizeprivate final IntegerexternalSizeprivate final IntegerestimatedExternalSizeprivate final IntegerestimatedSize
-
Constructor Summary
Constructors Constructor Description AbstractUrlCache(String name, Integer priority)
-
Method Summary
Modifier and Type Method Description StringgetName()The cache name IntegergetPriority()The priority abstract Queue<UrlAware>getNonReentrantQueue()A non-reentrant queue accepts the same url only once abstract Queue<UrlAware>getNReentrantQueue()A non-reentrant queue accepts the same url for n times at most abstract Queue<UrlAware>getReentrantQueue()A reentrant queue accepts the same url multiple times List<Queue<UrlAware>>getQueues()IntegergetSize()IntegergetExternalSize()IntegergetEstimatedExternalSize()IntegergetEstimatedSize()UnitremoveDeceased()Remove dead urls. Unitclear()Clear the local cache. -
-
Method Detail
-
getPriority
Integer getPriority()
The priority
-
getNonReentrantQueue
abstract Queue<UrlAware> getNonReentrantQueue()
A non-reentrant queue accepts the same url only once
-
getNReentrantQueue
abstract Queue<UrlAware> getNReentrantQueue()
A non-reentrant queue accepts the same url for n times at most
-
getReentrantQueue
abstract Queue<UrlAware> getReentrantQueue()
A reentrant queue accepts the same url multiple times
-
getExternalSize
Integer getExternalSize()
-
getEstimatedExternalSize
Integer getEstimatedExternalSize()
-
getEstimatedSize
Integer getEstimatedSize()
-
removeDeceased
Unit removeDeceased()
Remove dead urls.
-
-
-
-