Package org.apache.http.pool
Class PoolStats
- java.lang.Object
-
- org.apache.http.pool.PoolStats
-
- All Implemented Interfaces:
java.io.Serializable
@Contract(threading=IMMUTABLE) public class PoolStats extends java.lang.Object implements java.io.Serializable
Pool statistics.The total number of connections in the pool is equal to
available
plusleased
.- Since:
- 4.2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
available
private int
leased
private int
max
private int
pending
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description PoolStats(int leased, int pending, int free, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAvailable()
Gets the number idle persistent connections.int
getLeased()
Gets the number of persistent connections tracked by the connection manager currently being used to execute requests.int
getMax()
Gets the maximum number of allowed persistent connections.int
getPending()
Gets the number of connection requests being blocked awaiting a free connection.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
leased
private final int leased
-
pending
private final int pending
-
available
private final int available
-
max
private final int max
-
-
Method Detail
-
getLeased
public int getLeased()
Gets the number of persistent connections tracked by the connection manager currently being used to execute requests.The total number of connections in the pool is equal to
available
plusleased
.- Returns:
- the number of persistent connections.
-
getPending
public int getPending()
Gets the number of connection requests being blocked awaiting a free connection. This can happen only if there are more worker threads contending for fewer connections.- Returns:
- the number of connection requests being blocked awaiting a free connection.
-
getAvailable
public int getAvailable()
Gets the number idle persistent connections.The total number of connections in the pool is equal to
available
plusleased
.- Returns:
- number idle persistent connections.
-
getMax
public int getMax()
Gets the maximum number of allowed persistent connections.- Returns:
- the maximum number of allowed persistent connections.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-