public class RemoteRuleConfig extends Object
Modifier and Type | Field and Description |
---|---|
long |
baseTimeoutMilliseconds |
long |
downMilliseconds |
float |
failureRateThreshold |
String |
language |
int |
minimumNumberOfCalls |
Map<String,String> |
options |
Integer |
port |
String |
ruleId |
int |
slidingWindowSize |
String |
slidingWindowType |
float |
timeoutPerCharacterMilliseconds |
String |
type |
String |
url |
Constructor and Description |
---|
RemoteRuleConfig() |
RemoteRuleConfig(RemoteRuleConfig copy) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getBaseTimeoutMilliseconds() |
long |
getDownMilliseconds() |
float |
getFailureRateThreshold() |
String |
getLanguage()
Regex to match language codes for which this rule should be applied
|
int |
getMinimumNumberOfCalls() |
Map<String,String> |
getOptions()
miscellaneous options for remote rules
allows implementing additional behavior in subclasses
some options defined in
RemoteRule :
fixOffsets: boolean - adjust offsets of matches because of discrepancies in string length for some unicode characters between Java and Python
filterMatches: boolean - enable anti-patterns from remote-rule-filters.xml
suppressMisspelledMatch: regex - filter out matches with matching rule IDs that have misspelled suggestions
suppressMisspelledSuggestions: regex - filter out misspelled suggestions from matches with matching rule IDs |
int |
getPort() |
static RemoteRuleConfig |
getRelevantConfig(String rule,
List<RemoteRuleConfig> configs) |
String |
getRuleId() |
int |
getSlidingWindowSize() |
String |
getSlidingWindowType() |
float |
getTimeoutPerCharacterMilliseconds() |
String |
getType()
Identifier for the implementation of RemoteRule that this configuration is meant for
|
String |
getUrl() |
int |
hashCode() |
static Predicate<RemoteRuleConfig> |
isRelevantConfig(String type,
Language language) |
static List<RemoteRuleConfig> |
load(File configFile) |
static List<RemoteRuleConfig> |
parse(InputStream json) |
String |
toString() |
public String ruleId
public String url
public Integer port
public long baseTimeoutMilliseconds
public float timeoutPerCharacterMilliseconds
public long downMilliseconds
public float failureRateThreshold
public String slidingWindowType
public int slidingWindowSize
public int minimumNumberOfCalls
public String language
public String type
public RemoteRuleConfig()
public RemoteRuleConfig(RemoteRuleConfig copy)
public static RemoteRuleConfig getRelevantConfig(String rule, List<RemoteRuleConfig> configs)
public static Predicate<RemoteRuleConfig> isRelevantConfig(String type, Language language)
public static List<RemoteRuleConfig> parse(InputStream json) throws IOException
IOException
public static List<RemoteRuleConfig> load(File configFile) throws ExecutionException
ExecutionException
public float getFailureRateThreshold()
public String getSlidingWindowType()
public int getSlidingWindowSize()
public String getRuleId()
public String getUrl()
public int getPort()
public long getDownMilliseconds()
public long getBaseTimeoutMilliseconds()
public float getTimeoutPerCharacterMilliseconds()
public int getMinimumNumberOfCalls()
public Map<String,String> getOptions()
RemoteRule
:
fixOffsets: boolean - adjust offsets of matches because of discrepancies in string length for some unicode characters between Java and Python
filterMatches: boolean - enable anti-patterns from remote-rule-filters.xml
suppressMisspelledMatch: regex - filter out matches with matching rule IDs that have misspelled suggestions
suppressMisspelledSuggestions: regex - filter out misspelled suggestions from matches with matching rule IDspublic String getLanguage()
public String getType()