类 IpPortBasedClient

  • 所有已实现的接口:
    Client

    public class IpPortBasedClient
    extends AbstractClient
    Nacos naming client based ip and port.

    The client is bind to the ip and port users registered. It's a abstract content to simulate the tcp session client.

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

      • ID_DELIMITER

        public static final java.lang.String ID_DELIMITER
        另请参阅:
        常量字段值
      • clientId

        private final java.lang.String clientId
      • ephemeral

        private final boolean ephemeral
      • responsibleId

        private final java.lang.String responsibleId
    • 构造器详细资料

      • IpPortBasedClient

        public IpPortBasedClient​(java.lang.String clientId,
                                 boolean ephemeral)
      • IpPortBasedClient

        public IpPortBasedClient​(java.lang.String clientId,
                                 boolean ephemeral,
                                 java.lang.Long revision)
    • 方法详细资料

      • getResponsibleTagFromId

        private java.lang.String getResponsibleTagFromId()
      • getClientId

        public static java.lang.String getClientId​(java.lang.String address,
                                                   boolean ephemeral)
      • 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
      • getResponsibleId

        public java.lang.String getResponsibleId()
      • isExpire

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

        public java.util.Collection<InstancePublishInfo> getAllInstancePublishInfo()
      • release

        public void release()
        从接口复制的说明: Client
        Release current client and release resources if neccessary.
        指定者:
        release 在接口中 Client
        覆盖:
        release 在类中 AbstractClient
      • init

        public void init()
        Init client.
      • putServiceInstance

        public void putServiceInstance​(Service service,
                                       InstancePublishInfo instance)
        Purely put instance into service without publish events.