Codota Logo
DefaultRequestLimitRulesSupplier.<init>
Code IndexAdd Codota to your IDE (free)

How to use
es.moki.ratelimitj.core.limiter.request.DefaultRequestLimitRulesSupplier
constructor

Best Java code snippets using es.moki.ratelimitj.core.limiter.request.DefaultRequestLimitRulesSupplier.<init> (Showing top 3 results out of 315)

  • Common ways to obtain DefaultRequestLimitRulesSupplier
private void myMethod () {
DefaultRequestLimitRulesSupplier d =
  • Codota IconSet rules;new DefaultRequestLimitRulesSupplier(rules)
  • Smart code suggestions by Codota
}
origin: mokies/ratelimitj

InMemorySlidingWindowRequestRateLimiter(ExpiringMap<String, ConcurrentMap<String, Long>> expiringKeyMap, Set<RequestLimitRule> rules, TimeSupplier timeSupplier) {
  requireNonNull(rules, "rules can not be null");
  requireNonNull(rules, "time supplier can not be null");
  if (rules.isEmpty()) {
    throw new IllegalArgumentException("at least one rule must be provided");
  }
  this.expiringKeyMap = expiringKeyMap;
  this.timeSupplier = timeSupplier;
  this.rulesSupplier = new DefaultRequestLimitRulesSupplier(rules);
}
origin: mokies/ratelimitj

public HazelcastSlidingWindowRequestRateLimiter(HazelcastInstance hz, Set<RequestLimitRule> rules, TimeSupplier timeSupplier) {
  requireNonNull(hz, "hazelcast can not be null");
  requireNonNull(rules, "rules can not be null");
  if (rules.isEmpty()) {
    throw new IllegalArgumentException("at least one rule must be provided");
  }
  requireNonNull(rules, "time supplier can not be null");
  this.hz = hz;
  this.rulesSupplier = new DefaultRequestLimitRulesSupplier(rules);
  this.timeSupplier = timeSupplier;
}
origin: mokies/ratelimitj

DefaultRequestLimitRulesSupplierTest() {
  allRules.add(RequestLimitRule.of(Duration.ofSeconds(1), 10).withName("localhostPerSeconds")
      .matchingKeys("localhost", "127.0.0.1"));
  allRules.add(RequestLimitRule.of(Duration.ofHours(1), 2000).withName("localhostPerHours")
      .matchingKeys("localhost", "127.0.0.1"));
  allRules.add(RequestLimitRule.of(Duration.ofSeconds(1), 5).withName("perSeconds"));
  allRules.add(RequestLimitRule.of(Duration.ofHours(1), 1000).withName("perHours"));
  requestLimitRulesSupplier = new DefaultRequestLimitRulesSupplier(allRules);
}
es.moki.ratelimitj.core.limiter.requestDefaultRequestLimitRulesSupplier<init>

Popular methods of DefaultRequestLimitRulesSupplier

  • getRules

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • requestLocationUpdates (LocationManager)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now