public class DefaultEmbeddedTokenServer extends Object implements EmbeddedClusterTokenServer
SentinelDefaultTokenServer
and the TokenService from SPI provider.| Constructor and Description |
|---|
DefaultEmbeddedTokenServer() |
| Modifier and Type | Method and Description |
|---|---|
void |
releaseConcurrentToken(Long tokenId) |
TokenResult |
requestConcurrentToken(String clientAddress,
Long ruleId,
int acquireCount) |
TokenResult |
requestParamToken(Long ruleId,
int acquireCount,
Collection<Object> params) |
TokenResult |
requestToken(Long ruleId,
int acquireCount,
boolean prioritized) |
void |
start() |
void |
stop() |
public void start()
throws Exception
start in interface ClusterTokenServerExceptionpublic void stop()
throws Exception
stop in interface ClusterTokenServerExceptionpublic TokenResult requestToken(Long ruleId, int acquireCount, boolean prioritized)
requestToken in interface TokenServicepublic TokenResult requestParamToken(Long ruleId, int acquireCount, Collection<Object> params)
requestParamToken in interface TokenServicepublic TokenResult requestConcurrentToken(String clientAddress, Long ruleId, int acquireCount)
requestConcurrentToken in interface TokenServicepublic void releaseConcurrentToken(Long tokenId)
releaseConcurrentToken in interface TokenServiceCopyright © 2021 Alibaba Group. All rights reserved.