-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from LianjiaTech/develop
Develop
- Loading branch information
Showing
17 changed files
with
375 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/github/lianjiatech/retrofit/spring/boot/config/DegradeProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.github.lianjiatech.retrofit.spring.boot.config; | ||
|
||
import com.github.lianjiatech.retrofit.spring.boot.degrade.BaseResourceNameParser; | ||
import com.github.lianjiatech.retrofit.spring.boot.degrade.DefaultResourceNameParser; | ||
import com.github.lianjiatech.retrofit.spring.boot.degrade.DegradeType; | ||
|
||
/** | ||
* @author 陈添明 | ||
*/ | ||
public class DegradeProperty { | ||
|
||
|
||
/** | ||
* 启用熔断降级 | ||
* enable degrade | ||
*/ | ||
private boolean enable = false; | ||
|
||
/** | ||
* 熔断降级类型,暂时只支持SENTINEL | ||
* degrade type, Only SENTINEL is currently supported | ||
*/ | ||
private DegradeType degradeType = DegradeType.SENTINEL; | ||
|
||
/** | ||
* 资源名称解析器 | ||
* resource name parser | ||
*/ | ||
private Class<? extends BaseResourceNameParser> resourceNameParser = DefaultResourceNameParser.class; | ||
|
||
|
||
public boolean isEnable() { | ||
return enable; | ||
} | ||
|
||
public void setEnable(boolean enable) { | ||
this.enable = enable; | ||
} | ||
|
||
public DegradeType getDegradeType() { | ||
return degradeType; | ||
} | ||
|
||
public void setDegradeType(DegradeType degradeType) { | ||
this.degradeType = degradeType; | ||
} | ||
|
||
public Class<? extends BaseResourceNameParser> getResourceNameParser() { | ||
return resourceNameParser; | ||
} | ||
|
||
public void setResourceNameParser(Class<? extends BaseResourceNameParser> resourceNameParser) { | ||
this.resourceNameParser = resourceNameParser; | ||
} | ||
} |
Oops, something went wrong.