接口 ClusterTransportClient
public interface ClusterTransportClient
Synchronous transport client for distributed flow control.
- 从以下版本开始:
- 1.4.0
- 作者:
- Eric Zhao
-
方法概要
修饰符和类型方法说明booleanisReady()Check whether the client has been started and ready for sending requests.sendRequest(ClusterRequest request) Send request to remote server and get response.voidstart()Start the client.voidstop()Stop the client.
-
方法详细资料
-
start
Start the client.- 抛出:
Exception- some error occurred (e.g. initialization failed)
-
stop
Stop the client.- 抛出:
Exception- some error occurred (e.g. shutdown failed)
-
sendRequest
Send request to remote server and get response.- 参数:
request- Sentinel cluster request- 返回:
- response from remote server
- 抛出:
Exception- some error occurs
-
isReady
boolean isReady()Check whether the client has been started and ready for sending requests.- 返回:
- true if the client is ready to send requests, otherwise false
-