Top Description Fields Constructors Methods
org.apache.http.pool

public Class PoolStats

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@Contract
threading:IMMUTABLE
Imports
org.apache.http.annotation.ThreadingBehavior, .Contract, java.io.Serializable

Pool statistics.

The total number of connections in the pool is equal to available plus leased.

Since
4.2

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final int
private static final long

Constructor Summary

AccessConstructor and Description
public
PoolStats(final int leased, final int pending, final int free, final int max)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

number idle persistent connections.
getAvailable
()

Gets the number idle persistent connections.

public int

Returns:

the number of persistent connections.
getLeased
()

Gets the number of persistent connections tracked by the connection manager currently being used to execute requests.

public int

Returns:

the maximum number of allowed persistent connections.
getMax
()

Gets the maximum number of allowed persistent connections.

public int

Returns:

the number of connection requests being blocked awaiting a free connection.
getPending
()

Gets the number of connection requests being blocked awaiting a free connection.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

availableback to summary
private final int available
leasedback to summary
private final int leased
maxback to summary
private final int max
pendingback to summary
private final int pending
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

PoolStatsback to summary
public PoolStats(final int leased, final int pending, final int free, final int max)

Method Detail

getAvailableback to summary
public int getAvailable()

Gets the number idle persistent connections.

The total number of connections in the pool is equal to available plus leased.

Returns:int

number idle persistent connections.

getLeasedback to summary
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 plus leased.

Returns:int

the number of persistent connections.

getMaxback to summary
public int getMax()

Gets the maximum number of allowed persistent connections.

Returns:int

the maximum number of allowed persistent connections.

getPendingback to summary
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:int

the number of connection requests being blocked awaiting a free connection.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override