类 ConnectionBasedClient

  • 所有已实现的接口:
    Client

    public class ConnectionBasedClient
    extends AbstractClient
    Nacos naming client based on tcp session.

    The client is bind to the tcp session. When the tcp session disconnect, the client should be clean.

    作者:
    xiweng.yy
    • 字段详细资料

      • connectionId

        private final java.lang.String connectionId
      • isNative

        private final boolean isNative
        true means this client is directly connect to current server. false means this client is synced from other server.
      • lastRenewTime

        private volatile long lastRenewTime
        Only has meaning when isNative is false, which means that the last time verify from source server.
    • 构造器详细资料

      • ConnectionBasedClient

        public ConnectionBasedClient​(java.lang.String connectionId,
                                     boolean isNative,
                                     java.lang.Long revision)
    • 方法详细资料

      • getClientId

        public java.lang.String getClientId()
        从接口复制的说明: Client
        Get the unique id of current client.
        返回:
        id of client
      • isEphemeral

        public boolean isEphemeral()
        从接口复制的说明: Client
        Whether is ephemeral of current client.
        返回:
        true if client is ephemeral, otherwise false
      • isNative

        public boolean isNative()
      • getLastRenewTime

        public long getLastRenewTime()
      • setLastRenewTime

        public void setLastRenewTime()
      • isExpire

        public boolean isExpire​(long currentTime)
        从接口复制的说明: Client
        Whether current client is expired.
        参数:
        currentTime - unified current timestamp
        返回:
        true if client has expired, otherwise false