/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.pool2.impl;

import java.util.List;
import java.util.Map;

Defines the methods that will be made available via JMX. NOTE: This interface exists only to define those attributes and methods that will be made available via JMX. It must not be implemented by clients as it is subject to change between major, minor and patch version releases of commons pool. Clients that implement this interface may not, therefore, be able to upgrade to a new minor or patch release without requiring code changes.
Type parameters:
  • <K> – The type of keys maintained by the pool.
Since:2.0
/** * Defines the methods that will be made available via JMX. * * NOTE: This interface exists only to define those attributes and methods that * will be made available via JMX. It must not be implemented by clients * as it is subject to change between major, minor and patch version * releases of commons pool. Clients that implement this interface may * not, therefore, be able to upgrade to a new minor or patch release * without requiring code changes. * * @param <K> The type of keys maintained by the pool. * * @since 2.0 */
public interface GenericKeyedObjectPoolMXBean<K> { // Expose getters for configuration settings
Returns:See BaseGenericObjectPool.getBlockWhenExhausted()
/** * See {@link GenericKeyedObjectPool#getBlockWhenExhausted()} * @return See {@link GenericKeyedObjectPool#getBlockWhenExhausted()} */
boolean getBlockWhenExhausted();
Returns:See BaseGenericObjectPool.getFairness()
/** * See {@link GenericKeyedObjectPool#getFairness()} * @return See {@link GenericKeyedObjectPool#getFairness()} */
boolean getFairness();
Returns:See BaseGenericObjectPool.getLifo()
/** * See {@link GenericKeyedObjectPool#getLifo()} * @return See {@link GenericKeyedObjectPool#getLifo()} */
boolean getLifo();
Returns:See GenericKeyedObjectPool.getMaxIdlePerKey()
/** * See {@link GenericKeyedObjectPool#getMaxIdlePerKey()} * @return See {@link GenericKeyedObjectPool#getMaxIdlePerKey()} */
int getMaxIdlePerKey();
Returns:See BaseGenericObjectPool.getMaxTotal()
/** * See {@link GenericKeyedObjectPool#getMaxTotal()} * @return See {@link GenericKeyedObjectPool#getMaxTotal()} */
int getMaxTotal();
Returns:See GenericKeyedObjectPool.getMaxTotalPerKey()
/** * See {@link GenericKeyedObjectPool#getMaxTotalPerKey()} * @return See {@link GenericKeyedObjectPool#getMaxTotalPerKey()} */
int getMaxTotalPerKey();
Returns:See BaseGenericObjectPool.getMaxWaitMillis()
/** * See {@link GenericKeyedObjectPool#getMaxWaitMillis()} * @return See {@link GenericKeyedObjectPool#getMaxWaitMillis()} */
long getMaxWaitMillis();
Returns:See BaseGenericObjectPool.getMinEvictableIdleTimeMillis()
/** * See {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis()} */
long getMinEvictableIdleTimeMillis();
Returns:See GenericKeyedObjectPool.getMinIdlePerKey()
/** * See {@link GenericKeyedObjectPool#getMinIdlePerKey()} * @return See {@link GenericKeyedObjectPool#getMinIdlePerKey()} */
int getMinIdlePerKey();
Returns:See GenericKeyedObjectPool.getNumActive()
/** * See {@link GenericKeyedObjectPool#getNumActive()} * @return See {@link GenericKeyedObjectPool#getNumActive()} */
int getNumActive();
Returns:See GenericKeyedObjectPool.getNumIdle()
/** * See {@link GenericKeyedObjectPool#getNumIdle()} * @return See {@link GenericKeyedObjectPool#getNumIdle()} */
int getNumIdle();
Returns:See BaseGenericObjectPool.getNumTestsPerEvictionRun()
/** * See {@link GenericKeyedObjectPool#getNumTestsPerEvictionRun()} * @return See {@link GenericKeyedObjectPool#getNumTestsPerEvictionRun()} */
int getNumTestsPerEvictionRun();
Returns:See BaseGenericObjectPool.getTestOnCreate()
Since:2.2
/** * See {@link GenericKeyedObjectPool#getTestOnCreate()} * @return See {@link GenericKeyedObjectPool#getTestOnCreate()} * @since 2.2 */
boolean getTestOnCreate();
Returns:See BaseGenericObjectPool.getTestOnBorrow()
/** * See {@link GenericKeyedObjectPool#getTestOnBorrow()} * @return See {@link GenericKeyedObjectPool#getTestOnBorrow()} */
boolean getTestOnBorrow();
Returns:See BaseGenericObjectPool.getTestOnReturn()
/** * See {@link GenericKeyedObjectPool#getTestOnReturn()} * @return See {@link GenericKeyedObjectPool#getTestOnReturn()} */
boolean getTestOnReturn();
Returns:See BaseGenericObjectPool.getTestWhileIdle()
/** * See {@link GenericKeyedObjectPool#getTestWhileIdle()} * @return See {@link GenericKeyedObjectPool#getTestWhileIdle()} */
boolean getTestWhileIdle();
Returns:See BaseGenericObjectPool.getTimeBetweenEvictionRunsMillis()
/** * See {@link GenericKeyedObjectPool#getTimeBetweenEvictionRunsMillis()} * @return See {@link GenericKeyedObjectPool#getTimeBetweenEvictionRunsMillis()} */
long getTimeBetweenEvictionRunsMillis();
Returns:See BaseGenericObjectPool.isClosed()
/** * See {@link GenericKeyedObjectPool#isClosed()} * @return See {@link GenericKeyedObjectPool#isClosed()} */
boolean isClosed(); // Expose getters for monitoring attributes
Returns:See GenericKeyedObjectPool.getNumActivePerKey()
/** * See {@link GenericKeyedObjectPool#getNumActivePerKey()} * @return See {@link GenericKeyedObjectPool#getNumActivePerKey()} */
Map<String,Integer> getNumActivePerKey();
Returns:See BaseGenericObjectPool.getBorrowedCount()
/** * See {@link GenericKeyedObjectPool#getBorrowedCount()} * @return See {@link GenericKeyedObjectPool#getBorrowedCount()} */
long getBorrowedCount();
Returns:See BaseGenericObjectPool.getReturnedCount()
/** * See {@link GenericKeyedObjectPool#getReturnedCount()} * @return See {@link GenericKeyedObjectPool#getReturnedCount()} */
long getReturnedCount();
Returns:See BaseGenericObjectPool.getCreatedCount()
/** * See {@link GenericKeyedObjectPool#getCreatedCount()} * @return See {@link GenericKeyedObjectPool#getCreatedCount()} */
long getCreatedCount();
Returns:See BaseGenericObjectPool.getDestroyedCount()
/** * See {@link GenericKeyedObjectPool#getDestroyedCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedCount()} */
long getDestroyedCount();
Returns:See BaseGenericObjectPool.getDestroyedByEvictorCount()
/** * See {@link GenericKeyedObjectPool#getDestroyedByEvictorCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedByEvictorCount()} */
long getDestroyedByEvictorCount();
Returns:See BaseGenericObjectPool.getDestroyedByBorrowValidationCount()
/** * See {@link GenericKeyedObjectPool#getDestroyedByBorrowValidationCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedByBorrowValidationCount()} */
long getDestroyedByBorrowValidationCount();
Returns:See BaseGenericObjectPool.getMeanActiveTimeMillis()
/** * See {@link GenericKeyedObjectPool#getMeanActiveTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMeanActiveTimeMillis()} */
long getMeanActiveTimeMillis();
Returns:See BaseGenericObjectPool.getMeanIdleTimeMillis()
/** * See {@link GenericKeyedObjectPool#getMeanIdleTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMeanIdleTimeMillis()} */
long getMeanIdleTimeMillis();
Returns:See BaseGenericObjectPool.getMaxBorrowWaitTimeMillis()
/** * See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} */
long getMeanBorrowWaitTimeMillis();
Returns:See BaseGenericObjectPool.getMaxBorrowWaitTimeMillis()
/** * See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} */
long getMaxBorrowWaitTimeMillis();
Returns:See BaseGenericObjectPool.getCreationStackTrace()
/** * See {@link GenericKeyedObjectPool#getCreationStackTrace()} * @return See {@link GenericKeyedObjectPool#getCreationStackTrace()} */
String getCreationStackTrace();
Returns:See GenericKeyedObjectPool.getNumWaiters()
/** * See {@link GenericKeyedObjectPool#getNumWaiters()} * @return See {@link GenericKeyedObjectPool#getNumWaiters()} */
int getNumWaiters();
Returns:See GenericKeyedObjectPool.getNumWaitersByKey()
/** * See {@link GenericKeyedObjectPool#getNumWaitersByKey()} * @return See {@link GenericKeyedObjectPool#getNumWaitersByKey()} */
Map<String,Integer> getNumWaitersByKey();
Returns:See GenericKeyedObjectPool.listAllObjects()
/** * See {@link GenericKeyedObjectPool#listAllObjects()} * @return See {@link GenericKeyedObjectPool#listAllObjects()} */
Map<String,List<DefaultPooledObjectInfo>> listAllObjects(); }