-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.collect.Loadable,ai.platon.pulsar.common.collect.queue.LoadingQueue,java.util.Queue,kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.MutableCollection,kotlin.collections.MutableIterable
public final class ConcurrentNonReentrantLoadingQueue extends DelayLoadingQueue
-
-
Field Summary
Fields Modifier and Type Field Description private final DurationidleTimeprivate final BooleanisIdleprivate final BooleanisBusyprivate final DurationadjustedEstimateDelayprivate final BooleanisExpiredprivate final IntegerestimatedExternalSizeprivate DurationloadDelayprivate DurationestimateDelayprivate IntegerloadCountprivate IntegersavedCountprivate final Collection<UrlAware>cacheprivate final Integersizeprivate final IntegerexternalSizeprivate final IntegerfreeSlotsprivate final BooleanisFullprivate final ExternalUrlLoaderloaderprivate final UrlTopictopicprivate final Function1<UrlAware, UrlAware>transformer
-
Constructor Summary
Constructors Constructor Description ConcurrentNonReentrantLoadingQueue(ExternalUrlLoader loader, UrlTopic topic, Duration ttl, Function1<UrlAware, UrlAware> transformer)
-
Method Summary
Modifier and Type Method Description final DurationgetIdleTime()final BooleangetIsIdle()final BooleangetIsBusy()final DurationgetAdjustedEstimateDelay()final BooleangetIsExpired()IntegergetEstimatedExternalSize()final DurationgetLoadDelay()The delay time to load after another load final UnitsetLoadDelay(Duration loadDelay)The delay time to load after another load final DurationgetEstimateDelay()final UnitsetEstimateDelay(Duration estimateDelay)final IntegergetLoadCount()final UnitsetLoadCount(Integer loadCount)final IntegergetSavedCount()final UnitsetSavedCount(Integer savedCount)final Collection<UrlAware>getCache()IntegergetSize()IntegergetExternalSize()final IntegergetFreeSlots()final BooleangetIsFull()final ExternalUrlLoadergetLoader()final UrlTopicgetTopic()final Function1<UrlAware, UrlAware>getTransformer()final IntegercountHistory(UrlAware url)final IntegercountHistory(Integer hashCode)Booleanoffer(UrlAware url)-
Methods inherited from class ai.platon.pulsar.common.collect.queue.ConcurrentNonReentrantLoadingQueue
expire, isExpired, load, load, loadNow, peek, poll -
Methods inherited from class ai.platon.pulsar.common.collect.queue.DelayLoadingQueue
add, addAll, clear, deepClear, externalClear, iterator, overflow, overflow, removeIf, shuffle -
Methods inherited from class ai.platon.pulsar.common.collect.queue.AbstractLoadingQueue
element, remove -
Methods inherited from class java.util.AbstractQueue
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString -
Methods inherited from class kotlin.collections.Collection
forEach -
Methods inherited from class kotlin.collections.MutableCollection
parallelStream, spliterator, stream, toArray -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ConcurrentNonReentrantLoadingQueue
ConcurrentNonReentrantLoadingQueue(ExternalUrlLoader loader, UrlTopic topic, Duration ttl, Function1<UrlAware, UrlAware> transformer)
-
-
Method Detail
-
getIdleTime
final Duration getIdleTime()
-
getAdjustedEstimateDelay
final Duration getAdjustedEstimateDelay()
-
getIsExpired
final Boolean getIsExpired()
-
getEstimatedExternalSize
@Synchronized() Integer getEstimatedExternalSize()
-
getLoadDelay
final Duration getLoadDelay()
The delay time to load after another load
-
setLoadDelay
final Unit setLoadDelay(Duration loadDelay)
The delay time to load after another load
-
getEstimateDelay
final Duration getEstimateDelay()
-
setEstimateDelay
final Unit setEstimateDelay(Duration estimateDelay)
-
getLoadCount
final Integer getLoadCount()
-
setLoadCount
final Unit setLoadCount(Integer loadCount)
-
getSavedCount
final Integer getSavedCount()
-
setSavedCount
final Unit setSavedCount(Integer savedCount)
-
getCache
final Collection<UrlAware> getCache()
-
getSize
@Synchronized() Integer getSize()
-
getExternalSize
@Synchronized() Integer getExternalSize()
-
getFreeSlots
@Synchronized() final Integer getFreeSlots()
-
getIsFull
@Synchronized() final Boolean getIsFull()
-
getLoader
final ExternalUrlLoader getLoader()
-
getTransformer
final Function1<UrlAware, UrlAware> getTransformer()
-
countHistory
@Synchronized() final Integer countHistory(UrlAware url)
-
countHistory
@Synchronized() final Integer countHistory(Integer hashCode)
-
offer
@Synchronized() Boolean offer(UrlAware url)
-
-
-
-