public class FlowRule extends AbstractRule
Each flow rule is mainly composed of three factors: grade, strategy and controlBehavior:
grade represents the threshold type of flow control (by QPS or thread count).strategy represents the strategy based on invocation relation.controlBehavior represents the QPS shaping behavior (actions on incoming request when QPS
exceeds the threshold).| Constructor and Description |
|---|
FlowRule() |
FlowRule(String resourceName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ClusterFlowConfig |
getClusterConfig() |
int |
getControlBehavior() |
double |
getCount() |
int |
getGrade() |
int |
getMaxQueueingTimeMs() |
String |
getRefResource() |
int |
getStrategy() |
int |
getWarmUpPeriodSec() |
int |
hashCode() |
boolean |
isClusterMode() |
FlowRule |
setClusterConfig(ClusterFlowConfig clusterConfig) |
FlowRule |
setClusterMode(boolean clusterMode) |
FlowRule |
setControlBehavior(int controlBehavior) |
FlowRule |
setCount(double count) |
FlowRule |
setGrade(int grade) |
FlowRule |
setMaxQueueingTimeMs(int maxQueueingTimeMs) |
FlowRule |
setRefResource(String refResource) |
FlowRule |
setStrategy(int strategy) |
FlowRule |
setWarmUpPeriodSec(int warmUpPeriodSec) |
String |
toString() |
as, getLimitApp, getResource, setLimitApp, setResourcepublic FlowRule()
public FlowRule(String resourceName)
public int getControlBehavior()
public FlowRule setControlBehavior(int controlBehavior)
public int getMaxQueueingTimeMs()
public FlowRule setMaxQueueingTimeMs(int maxQueueingTimeMs)
public int getWarmUpPeriodSec()
public FlowRule setWarmUpPeriodSec(int warmUpPeriodSec)
public int getGrade()
public FlowRule setGrade(int grade)
public double getCount()
public FlowRule setCount(double count)
public int getStrategy()
public FlowRule setStrategy(int strategy)
public String getRefResource()
public boolean isClusterMode()
public FlowRule setClusterMode(boolean clusterMode)
public ClusterFlowConfig getClusterConfig()
public FlowRule setClusterConfig(ClusterFlowConfig clusterConfig)
public boolean equals(Object o)
equals in class AbstractRulepublic int hashCode()
hashCode in class AbstractRuleCopyright © 2021 Alibaba Group. All rights reserved.