Class InternalSubchannel

    • Method Detail

      • getTransport

        @Nullable
        ClientTransport getTransport()
        Returns a READY transport if there is any, without trying to connect.
      • getAuthority

        java.lang.String getAuthority()
        Returns the authority string associated with this Subchannel.
      • startNewTransport

        private void startNewTransport()
      • scheduleBackoff

        private void scheduleBackoff​(Status status)
        Only called after all addresses attempted and failed (TRANSIENT_FAILURE).
        Parameters:
        status - the causal status when the channel begins transition to TRANSIENT_FAILURE.
      • resetConnectBackoff

        void resetConnectBackoff()
        Immediately attempt to reconnect if the current state is TRANSIENT_FAILURE. Otherwise this method has no effect.
      • updateAddresses

        public void updateAddresses​(java.util.List<EquivalentAddressGroup> newAddressGroups)
        Replaces the existing addresses, avoiding unnecessary reconnects.
      • shutdown

        public void shutdown​(Status reason)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • handleTermination

        private void handleTermination()
      • handleTransportInUseState

        private void handleTransportInUseState​(ConnectionClientTransport transport,
                                               boolean inUse)
      • shutdownNow

        void shutdownNow​(Status reason)
      • cancelReconnectTask

        private void cancelReconnectTask()
      • getLogId

        public InternalLogId getLogId()
        Description copied from interface: InternalWithLogId
        Returns an ID that is primarily used in debug logs. It usually contains the class name and a numeric ID that is unique among the instances.

        The subclasses of this interface usually want to include the log ID in their Object.toString() results.

        Specified by:
        getLogId in interface InternalWithLogId
      • getConnectedAddressAttributes

        public Attributes getConnectedAddressAttributes()
        Return attributes for server address connected by sub channel.
      • checkListHasNoNulls

        private static void checkListHasNoNulls​(java.util.List<?> list,
                                                java.lang.String msg)
      • printShortStatus

        private java.lang.String printShortStatus​(Status status)