public class PoolManager extends Object implements DynamicMBean
| Modifier and Type | Field and Description |
|---|---|
static String |
CLEAN_OBJECT_POOLS |
static long |
DEFAULT_INTERVAL |
static String |
DEFAULT_POOL_MANAGER_NAME |
static long |
MINIMUM_INTERVAL |
static String |
POOL_MANAGER_EVICTION_INTERVAL |
static String |
REGISTERED_POOLS |
static String |
SET_POOL_MANAGER_EVICTION_INTERVAL |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ObjectPool objectPool)
Adds the supplied ObjectPool to the list of ObjectPool's managed by this
PoolManager.
|
String |
cleanObjectPools() |
Object |
getAttribute(String attribute) |
AttributeList |
getAttributes(String[] attributes) |
MBeanInfo |
getMBeanInfo()
Provides lazy instantiation of the PoolManager's MBeanInfo, yet allows
for reuse.
|
String |
getName()
Returns the name of the PoolManager.
|
static PoolManager |
getOrCreate()
Returns the default PoolManager instance (creating it if necessary).
|
static PoolManager |
getOrCreate(String poolManagerName)
Returns the PoolManager instance associated with the supplied name
(creating it if necessary).
|
long |
getPoolManagerEvictionInterval()
Returns the PoolManager's timer interval in milliseconds.
|
int |
getRegisteredNumberOfPools()
Returns the number of registered object pools.
|
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
String |
setPoolManagerEvictionInterval(long interval)
Provides the implementation for setting the pool manager eviction
interval via JMX.
|
public static final String POOL_MANAGER_EVICTION_INTERVAL
public static final String SET_POOL_MANAGER_EVICTION_INTERVAL
public static final String CLEAN_OBJECT_POOLS
public static final String REGISTERED_POOLS
public static final long MINIMUM_INTERVAL
public static final long DEFAULT_INTERVAL
public static final String DEFAULT_POOL_MANAGER_NAME
public static PoolManager getOrCreate()
public static PoolManager getOrCreate(String poolManagerName)
poolManagerName - The name of the PoolManager instance to return.public void add(ObjectPool objectPool)
objectPool - The ObjectPool to be managed.public MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeanpublic Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionpublic Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke in interface DynamicMBeanMBeanExceptionReflectionExceptionpublic void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionpublic AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBeanpublic AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanpublic String setPoolManagerEvictionInterval(long interval)
interval - The new interval in milliseconds.public String cleanObjectPools()
public String getName()
public long getPoolManagerEvictionInterval()
public int getRegisteredNumberOfPools()
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.