Package org.ldaptive.pool
Class AbstractConnectionPool.DefaultPooledConnectionProxy
java.lang.Object
org.ldaptive.pool.AbstractConnectionPool.DefaultPooledConnectionProxy
- All Implemented Interfaces:
InvocationHandler,PooledConnectionProxy
- Enclosing class:
- AbstractConnectionPool
protected class AbstractConnectionPool.DefaultPooledConnectionProxy
extends Object
implements PooledConnectionProxy
Contains a connection that is participating in this pool. Used to track how long a connection has been in use and
override certain method invocations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionUnderlying connection.private final InstantTime this connection was created.private static final inthash code seed.private final PooledConnectionStatisticsStatistics for this connection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the connection that is being proxied.Returns the connection pool that this proxy is participating in.Returns the time this proxy was created.intReturns the maximum size of the connection pool that this proxy is participating in.intReturns the minimum size of the connection pool that this proxy is participating in.Returns the statistics associated with this connection's activity in the pool.inthashCode()toString()
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
conn
Underlying connection. -
createdTime
Time this connection was created. -
statistics
Statistics for this connection.
-
-
Constructor Details
-
DefaultPooledConnectionProxy
Creates a new pooled connection.- Parameters:
c- connection to participate in this pool
-
-
Method Details
-
getConnectionPool
Description copied from interface:PooledConnectionProxyReturns the connection pool that this proxy is participating in.- Specified by:
getConnectionPoolin interfacePooledConnectionProxy- Returns:
- connection pool
-
getConnection
Description copied from interface:PooledConnectionProxyReturns the connection that is being proxied.- Specified by:
getConnectionin interfacePooledConnectionProxy- Returns:
- underlying connection
-
getCreatedTime
Description copied from interface:PooledConnectionProxyReturns the time this proxy was created.- Specified by:
getCreatedTimein interfacePooledConnectionProxy- Returns:
- creation timestamp in milliseconds
-
getPooledConnectionStatistics
Description copied from interface:PooledConnectionProxyReturns the statistics associated with this connection's activity in the pool.- Specified by:
getPooledConnectionStatisticsin interfacePooledConnectionProxy- Returns:
- pooled connection statistics
-
getMinPoolSize
public int getMinPoolSize()Description copied from interface:PooledConnectionProxyReturns the minimum size of the connection pool that this proxy is participating in.- Specified by:
getMinPoolSizein interfacePooledConnectionProxy- Returns:
- minimum pool size
-
getMaxPoolSize
public int getMaxPoolSize()Description copied from interface:PooledConnectionProxyReturns the maximum size of the connection pool that this proxy is participating in.- Specified by:
getMaxPoolSizein interfacePooledConnectionProxy- Returns:
- maximum pool size
-
equals
-
hashCode
public int hashCode() -
toString
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-