类 DefaultEmbeddedTokenServer
java.lang.Object
com.alibaba.csp.sentinel.cluster.server.DefaultEmbeddedTokenServer
- 所有已实现的接口:
com.alibaba.csp.sentinel.cluster.server.ClusterTokenServer,com.alibaba.csp.sentinel.cluster.server.EmbeddedClusterTokenServer,com.alibaba.csp.sentinel.cluster.TokenService
public class DefaultEmbeddedTokenServer
extends Object
implements com.alibaba.csp.sentinel.cluster.server.EmbeddedClusterTokenServer
Default embedded token server in Sentinel which wraps the
SentinelDefaultTokenServer
and the TokenService from SPI provider.- 从以下版本开始:
- 1.4.0
- 作者:
- Eric Zhao
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidreleaseConcurrentToken(Long tokenId) com.alibaba.csp.sentinel.cluster.TokenResultrequestConcurrentToken(String clientAddress, Long ruleId, int acquireCount) com.alibaba.csp.sentinel.cluster.TokenResultrequestParamToken(Long ruleId, int acquireCount, Collection<Object> params) com.alibaba.csp.sentinel.cluster.TokenResultrequestToken(Long ruleId, int acquireCount, boolean prioritized) voidstart()voidstop()
-
构造器详细资料
-
DefaultEmbeddedTokenServer
public DefaultEmbeddedTokenServer()
-
-
方法详细资料
-
start
- 指定者:
start在接口中com.alibaba.csp.sentinel.cluster.server.ClusterTokenServer- 抛出:
Exception
-
stop
- 指定者:
stop在接口中com.alibaba.csp.sentinel.cluster.server.ClusterTokenServer- 抛出:
Exception
-
requestToken
public com.alibaba.csp.sentinel.cluster.TokenResult requestToken(Long ruleId, int acquireCount, boolean prioritized) - 指定者:
requestToken在接口中com.alibaba.csp.sentinel.cluster.TokenService
-
requestParamToken
public com.alibaba.csp.sentinel.cluster.TokenResult requestParamToken(Long ruleId, int acquireCount, Collection<Object> params) - 指定者:
requestParamToken在接口中com.alibaba.csp.sentinel.cluster.TokenService
-
requestConcurrentToken
public com.alibaba.csp.sentinel.cluster.TokenResult requestConcurrentToken(String clientAddress, Long ruleId, int acquireCount) - 指定者:
requestConcurrentToken在接口中com.alibaba.csp.sentinel.cluster.TokenService
-
releaseConcurrentToken
- 指定者:
releaseConcurrentToken在接口中com.alibaba.csp.sentinel.cluster.TokenService
-