public abstract class AbstractGrayReleaseFilter extends Object implements IGrayReleaseFilter
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGrayReleaseFilter.InstanceScope |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_INSTANCE_GROUP |
protected static String |
DEFAULT_MICROSERVICE_VERSION |
protected static String |
GRAY_RULE_GROUP_KEY |
protected static String |
GRAY_RULE_POLICY_KEY |
protected static String |
GRAY_RULE_TYPE_KEY |
protected List<GrayReleaseRulePolicy> |
grayRules
灰度发布匹配规则 map结构,key是groupId,value是规则对象内容
|
protected static String |
GROUP_RULE_NAME_KEY |
protected static String |
GROUP_RULE_RULE_KEY |
protected List<GrayReleaseGroupPolicy> |
groupRules
instance分组规则 map结构,key是groupId,value是分组规则对象
|
protected static String |
INSTANCE_GROUP_TAG_KEY |
protected static String |
INSTANCE_GROUP_VERSION_KEY |
protected AbstractGrayReleaseFilter.InstanceScope |
instanceScope |
protected Invocation |
invocation |
protected static org.slf4j.Logger |
LOGGER |
protected static String |
NULL_STR |
protected static String |
OPERATOR_NAME |
protected Map<String,Object> |
reqParams
请求参数列表 map,key,value分别是参数名和参数对象值
|
protected List<String> |
versions |
| Constructor and Description |
|---|
AbstractGrayReleaseFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
defineInstanceScope() |
protected abstract void |
fillGrayRules()
填充灰度发布规则 将灰度发布规则写入rules字段,按map结构写入,key为groupId,value为规则内容对象
|
protected abstract void |
fillGroupRules()
填充instance分组规则
将instance分组规则写入groupRules字段。按map结构写入,key是groupId,value是分组规则对象
|
protected void |
fillInstanceGroup() |
void |
filterRule() |
Map<String,Map<String,io.servicecomb.serviceregistry.api.registry.MicroserviceInstance>> |
getGrayInstanceMap() |
List<GrayReleaseRulePolicy> |
getGrayRules()
获取grayRules的值
|
protected abstract String |
getGroupNameByGroupRule(String tag,
String version) |
List<GrayReleaseGroupPolicy> |
getGroupRules()
获取groupRules的值
|
Invocation |
getInvocation() |
Map<String,Object> |
getReqParams() |
protected abstract String |
grayChooseForGroupIdByRules() |
void |
init(Invocation invocation) |
protected abstract boolean |
isReqCompare() |
void |
setGrayRules(List<GrayReleaseRulePolicy> grayRules)
对grayRules进行赋值
|
void |
setGroupRules(List<GrayReleaseGroupPolicy> groupRules)
对groupRules进行赋值
|
protected void |
setInstanceScope(AbstractGrayReleaseFilter.InstanceScope instanceScope) |
protected void |
setVersions(List<String> versions) |
protected void |
updateInstanceCache(String chosenGroup) |
protected static final org.slf4j.Logger LOGGER
protected Invocation invocation
protected List<GrayReleaseGroupPolicy> groupRules
protected static final String DEFAULT_INSTANCE_GROUP
protected static final String INSTANCE_GROUP_TAG_KEY
protected static final String INSTANCE_GROUP_VERSION_KEY
protected static final String OPERATOR_NAME
protected static final String DEFAULT_MICROSERVICE_VERSION
protected static final String GROUP_RULE_NAME_KEY
protected static final String GROUP_RULE_RULE_KEY
protected static final String GRAY_RULE_GROUP_KEY
protected static final String GRAY_RULE_TYPE_KEY
protected static final String GRAY_RULE_POLICY_KEY
protected static final String NULL_STR
protected List<GrayReleaseRulePolicy> grayRules
protected AbstractGrayReleaseFilter.InstanceScope instanceScope
public Invocation getInvocation()
public Map<String,Map<String,io.servicecomb.serviceregistry.api.registry.MicroserviceInstance>> getGrayInstanceMap()
public List<GrayReleaseGroupPolicy> getGroupRules()
public List<GrayReleaseRulePolicy> getGrayRules()
public void setGrayRules(List<GrayReleaseRulePolicy> grayRules)
grayRules - grayRules的新值public void setGroupRules(List<GrayReleaseGroupPolicy> groupRules)
groupRules - groupRules的新值public void init(Invocation invocation)
public void filterRule()
filterRule in interface IGrayReleaseFilterprotected abstract boolean isReqCompare()
protected abstract void fillGrayRules()
protected abstract void fillGroupRules()
protected abstract void defineInstanceScope()
protected void setInstanceScope(AbstractGrayReleaseFilter.InstanceScope instanceScope)
protected abstract String grayChooseForGroupIdByRules()
protected void fillInstanceGroup()
protected void updateInstanceCache(String chosenGroup)
Copyright © 2017. All rights reserved.