Tabnine Logo
RateLimiterConfig.load
Code IndexAdd Tabnine to your IDE (free)

How to use
load
method
in
com.eudemon.ratelimiter.env.RateLimiterConfig

Best Java code snippets using com.eudemon.ratelimiter.env.RateLimiterConfig.load (Showing top 3 results out of 315)

origin: wangzheng0822/ratelimiter4j

private RateLimiterBeansFactory() {
 RateLimiterConfig.instance().load();
}
origin: wangzheng0822/ratelimiter4j

public ZookeeperRuleConfigSource(String address, String path, RuleConfigParser ruleConfigParser) {
 RateLimiterConfig.instance().load();
 if (StringUtils.isEmpty(address)) {
  address = RateLimiterConfig.instance().getZookeeperConfig().getAddress();
 }
 if (StringUtils.isEmpty(path)) {
  path = RateLimiterConfig.instance().getZookeeperConfig().getPath();
 }
 this.address = address;
 this.path = path;
 this.ruleConfigParser = BEANS_CONTEXT.obtainRuleConfigParser(ruleConfigParser);
}
origin: wangzheng0822/ratelimiter4j

public void testLoad() {
 List<PropertySourceLoader> loaders = new ArrayList<>();
 loaders.add(new PropertySourceLoaderB());
 loaders.add(new PropertySourceLoaderA());
 loaders.add(new PropertySourceLoaderC());
 RateLimiterConfig config = new RateLimiterConfig(loaders);
 config.load();
 assertEquals(config.getRuleConfigSourceType(), "C-source");
 assertEquals(config.getRuleConfigParserType(), "C-parser");
 assertEquals(config.getRedisConfig().getAddress(), "A-addr");
}
com.eudemon.ratelimiter.envRateLimiterConfigload

Javadoc

load( or override) priority: jvm > system > file(yaml, properties) > classpath(yaml, properties) TODO(zheng): support more environment source command line > jvm > system > jndi > file > classpath

Popular methods of RateLimiterConfig

  • getRedisConfig
  • getRuleConfigParserType
  • getRuleConfigSourceType
  • <init>
  • getZookeeperConfig
  • instance
  • mapPropertiesToConfigs

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Kernel (java.awt.image)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now