Verified Owner
Top Fields Constructors Methods
org.jabref.logic.importer.fetcher

pack-priv final Class FetcherRateLimiter

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.time.Duration, com.google.common.util.concurrent.RateLimiter, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final Logger
private final RateLimiter
private final String

Constructor Summary

AccessConstructor and Description
private
FetcherRateLimiter(String serviceName, double requestsPerSecond)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
acquire(String requestContext)

pack-priv double
pack-priv static FetcherRateLimiter
ofRequestsPerInterval(String serviceName, int requests, Duration interval)

pack-priv static FetcherRateLimiter
ofRequestsPerSecond(String serviceName, double requestsPerSecond)

pack-priv void
setRate(double requestsPerSecond)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER
rateLimiterback to summary
private final RateLimiter rateLimiter
serviceNameback to summary
private final String serviceName

Constructor Detail

FetcherRateLimiterback to summary
private FetcherRateLimiter(String serviceName, double requestsPerSecond)

Method Detail

acquireback to summary
pack-priv void acquire(String requestContext)
getRateback to summary
pack-priv double getRate()
ofRequestsPerIntervalback to summary
pack-priv static FetcherRateLimiter ofRequestsPerInterval(String serviceName, int requests, Duration interval)
ofRequestsPerSecondback to summary
pack-priv static FetcherRateLimiter ofRequestsPerSecond(String serviceName, double requestsPerSecond)
setRateback to summary
pack-priv void setRate(double requestsPerSecond)