Class ObjectPoolMonitor
- java.lang.Object
-
- org.nuxeo.ecm.core.management.jtajca.internal.ObjectPoolMonitor
-
- All Implemented Interfaces:
ConnectionPoolMonitor
,Monitor
public class ObjectPoolMonitor extends Object implements ConnectionPoolMonitor
Connection pool monitor for an Apache Commons Pool.
-
-
Field Summary
Fields Modifier and Type Field Description protected io.dropwizard.metrics5.MetricName
countGauge
protected io.dropwizard.metrics5.MetricName
idleGauge
protected String
key
protected io.dropwizard.metrics5.MetricName
killedGauge
protected static io.dropwizard.metrics5.MetricRegistry
METRICS
protected String
name
protected org.apache.commons.pool2.impl.GenericKeyedObjectPool<String,?>
pool
protected DefaultMonitorComponent.ServerInstance
self
-
Fields inherited from interface org.nuxeo.ecm.core.management.jtajca.ConnectionPoolMonitor
NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ObjectPoolMonitor(String name, org.apache.commons.pool2.impl.GenericKeyedObjectPool<String,?> pool, String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getActiveTimeoutMinutes()
Returns the active timeout before the connection being killed.int
getBlockingTimeoutMilliseconds()
int
getConnectionCount()
int
getIdleConnectionCount()
int
getIdleTimeoutMinutes()
long
getKilledActiveConnectionCount()
Returns the current killed connection countString
getName()
Returns the pool namevoid
install()
int
killActiveTimedoutConnections()
Kills active timed out connections in the pool.void
reset()
Destroys the current connection manager and replace it by a new onevoid
uninstall()
-
-
-
Field Detail
-
METRICS
protected static final io.dropwizard.metrics5.MetricRegistry METRICS
-
countGauge
protected io.dropwizard.metrics5.MetricName countGauge
-
idleGauge
protected io.dropwizard.metrics5.MetricName idleGauge
-
killedGauge
protected io.dropwizard.metrics5.MetricName killedGauge
-
self
protected DefaultMonitorComponent.ServerInstance self
-
-
Constructor Detail
-
ObjectPoolMonitor
protected ObjectPoolMonitor(String name, org.apache.commons.pool2.impl.GenericKeyedObjectPool<String,?> pool, String key)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ConnectionPoolMonitor
Returns the pool name- Specified by:
getName
in interfaceConnectionPoolMonitor
-
getConnectionCount
public int getConnectionCount()
- Specified by:
getConnectionCount
in interfaceConnectionPoolMonitor
-
getIdleConnectionCount
public int getIdleConnectionCount()
- Specified by:
getIdleConnectionCount
in interfaceConnectionPoolMonitor
-
getBlockingTimeoutMilliseconds
public int getBlockingTimeoutMilliseconds()
- Specified by:
getBlockingTimeoutMilliseconds
in interfaceConnectionPoolMonitor
-
getIdleTimeoutMinutes
public int getIdleTimeoutMinutes()
- Specified by:
getIdleTimeoutMinutes
in interfaceConnectionPoolMonitor
-
getActiveTimeoutMinutes
public int getActiveTimeoutMinutes()
Description copied from interface:ConnectionPoolMonitor
Returns the active timeout before the connection being killed.- Specified by:
getActiveTimeoutMinutes
in interfaceConnectionPoolMonitor
-
reset
public void reset()
Description copied from interface:ConnectionPoolMonitor
Destroys the current connection manager and replace it by a new one- Specified by:
reset
in interfaceConnectionPoolMonitor
-
getKilledActiveConnectionCount
public long getKilledActiveConnectionCount()
Description copied from interface:ConnectionPoolMonitor
Returns the current killed connection count- Specified by:
getKilledActiveConnectionCount
in interfaceConnectionPoolMonitor
-
killActiveTimedoutConnections
public int killActiveTimedoutConnections()
Description copied from interface:ConnectionPoolMonitor
Kills active timed out connections in the pool. Returns the killed count.- Specified by:
killActiveTimedoutConnections
in interfaceConnectionPoolMonitor
-
-