public interface TokenService
| Modifier and Type | Method and Description |
|---|---|
void |
releaseConcurrentToken(Long tokenId)
Request release concurrent tokens from remote token server asynchronously.
|
TokenResult |
requestConcurrentToken(String clientAddress,
Long ruleId,
int acquireCount)
Request acquire concurrent tokens from remote token server.
|
TokenResult |
requestParamToken(Long ruleId,
int acquireCount,
Collection<Object> params)
Request tokens for a specific parameter from remote token server.
|
TokenResult |
requestToken(Long ruleId,
int acquireCount,
boolean prioritized)
Request tokens from remote token server.
|
TokenResult requestToken(Long ruleId, int acquireCount, boolean prioritized)
ruleId - the unique rule IDacquireCount - token count to acquireprioritized - whether the request is prioritizedTokenResult requestParamToken(Long ruleId, int acquireCount, Collection<Object> params)
ruleId - the unique rule IDacquireCount - token count to acquireparams - parameter listTokenResult requestConcurrentToken(String clientAddress, Long ruleId, int acquireCount)
clientAddress - the address of the request belong.ruleId - ruleId the unique rule IDacquireCount - token count to acquirevoid releaseConcurrentToken(Long tokenId)
tokenId - the unique token IDCopyright © 2021 Alibaba Group. All rights reserved.