Interface ConnectionCache<C extends Connection>

    • Method Detail

      • getCacheType

        String getCacheType()
        User-provided indentifier for an instance of the OutboundConnectionCache.
      • numberOfConnections

        long numberOfConnections()
        Total number of connections currently managed by the cache.
      • numberOfIdleConnections

        long numberOfIdleConnections()
        Number of idle connections; that is, connections for which the number of get/release or responseReceived/responseProcessed calls are equal.
      • numberOfBusyConnections

        long numberOfBusyConnections()
        Number of non-idle connections. Normally, busy+idle==total, but this may not be strictly true due to concurrent updates to the connection cache.
      • numberOfReclaimableConnections

        long numberOfReclaimableConnections()
        Number of idle connections that are reclaimable. Such connections are not in use, and are not waiting to handle any responses.
      • highWaterMark

        int highWaterMark()
        Threshold at which connection reclamation begins.
      • numberToReclaim

        int numberToReclaim()
        Number of connections to reclaim each time reclamation starts.
      • close

        void close​(C conn)
        Close a connection, regardless of its state. This may cause requests to fail to be sent, and responses to be lost. Intended for handling serious errors, such as loss of framing on a TCP stream, that require closing the connection.