Skip to content

taobaorun/TGD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TGD:三峡大坝(限流 Token Bucket)

Example

        RateLimiter limiter = RateLimiter.builder().
                withTokenPerSecond(1).
                withType(RateLimiter.RateLimiterType.TB).
                build();
        for ( int i = 0 ;i < 10;i++){
            limiter.getToken(1);
            //...
        }

限流策略

Releases

No releases published

Packages

No packages published

Languages