接口 ClusterTransportClient


public interface ClusterTransportClient
Synchronous transport client for distributed flow control.
从以下版本开始:
1.4.0
作者:
Eric Zhao
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    Check whether the client has been started and ready for sending requests.
    Send request to remote server and get response.
    void
    Start the client.
    void
    Stop the client.
  • 方法详细资料

    • start

      void start() throws Exception
      Start the client.
      抛出:
      Exception - some error occurred (e.g. initialization failed)
    • stop

      void stop() throws Exception
      Stop the client.
      抛出:
      Exception - some error occurred (e.g. shutdown failed)
    • sendRequest

      ClusterResponse sendRequest(ClusterRequest request) throws Exception
      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