public class RateLimiterPlugin extends AbstractSoulPlugin
| 构造器和说明 |
|---|
RateLimiterPlugin(LocalCacheManager localCacheManager,
RedisRateLimiter redisRateLimiter)
Instantiates a new Rate limiter plugin.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected reactor.core.publisher.Mono<Void> |
doExecute(org.springframework.web.server.ServerWebExchange exchange,
SoulPluginChain chain,
SelectorData selector,
RuleData rule)
this is Template Method child has Implement your own logic.
|
int |
getOrder()
return plugin order .
|
String |
named()
acquire plugin name.
|
PluginTypeEnum |
pluginType()
return plugin type.
|
executeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitskippublic RateLimiterPlugin(LocalCacheManager localCacheManager, RedisRateLimiter redisRateLimiter)
localCacheManager - the local cache managerredisRateLimiter - the redis rate limiterpublic String named()
SoulPluginpublic PluginTypeEnum pluginType()
public int getOrder()
SoulPluginprotected reactor.core.publisher.Mono<Void> doExecute(org.springframework.web.server.ServerWebExchange exchange, SoulPluginChain chain, SelectorData selector, RuleData rule)
AbstractSoulPlugindoExecute 在类中 AbstractSoulPluginexchange - exchange the current server exchange ServerWebExchangechain - chain the current chain ServerWebExchangeselector - selector SelectorDatarule - rule RuleDataMono<Void> to indicate when request handling is completeCopyright © 2019 dromara. All rights reserved.