Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename addInterceptors method name #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public AbstractUrlRateLimiter(RateLimitRule rule, RateLimiterInterceptorChain ch
* @param interceptors the interceptor list to be added into the interceptor chain.
*/
@Override
public void addInteceptors(List<RateLimiterInterceptor> interceptors) {
public void addInterceptors(List<RateLimiterInterceptor> interceptors) {
if (interceptors != null && !interceptors.isEmpty()) {
this.interceptorChain.addInterceptors(interceptors);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public DistributedUrlRateLimiter build() {

DistributedUrlRateLimiter ratelimiter = new DistributedUrlRateLimiter(executor, source);
if (this.interceptors != null && !this.interceptors.isEmpty()) {
ratelimiter.addInteceptors(interceptors);
ratelimiter.addInterceptors(interceptors);
}
return ratelimiter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public MemoryUrlRateLimiter build() {

MemoryUrlRateLimiter ratelimiter = new MemoryUrlRateLimiter(source);
if (this.interceptors != null && !this.interceptors.isEmpty()) {
ratelimiter.addInteceptors(interceptors);
ratelimiter.addInterceptors(interceptors);
}
return ratelimiter;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/eudemon/ratelimiter/UrlRateLimiter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ void limit(String appId, String url)
*
* @param interceptors the interceptor list to be added into the interceptor chain.
*/
void addInteceptors(List<RateLimiterInterceptor> interceptors);
void addInterceptors(List<RateLimiterInterceptor> interceptors);

}