All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nepxion.aquarius.limit.LimitExecutor Maven / Gradle / Ivy

Go to download

Nepxion Aquarius is a list of distribution components based on Redis + Zookeeper with Nepxion Matrix AOP framework

There is a newer version: 2.0.13
Show newest version
package com.nepxion.aquarius.limit;

/**
 * 

Title: Nepxion Aquarius

*

Description: Nepxion Aquarius

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ public interface LimitExecutor { /** * 在给定的时间段里最多的访问限制次数(超出次数返回false);等下个时间段开始,才允许再次被访问(返回true),周而复始 * @param name 资源名字 * @param key 资源Key * @param limitPeriod 给定的时间段(单位秒) * @param limitCount 最多的访问限制次数 * @return boolean */ boolean tryAccess(String name, String key, int limitPeriod, int limitCount); boolean tryAccess(String compositeKey, int limitPeriod, int limitCount); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy