Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2010-2013 the original author or authors
   * 
   * Permission is hereby granted, free of charge, to any person obtaining
   * a copy of this software and associated documentation files (the
   * "Software"), to deal in the Software without restriction, including
   * without limitation the rights to use, copy, modify, merge, publish,
   * distribute, sublicense, and/or sell copies of the Software, and to
   * permit persons to whom the Software is furnished to do so, subject to
  * the following conditions:
  * 
  * The above copyright notice and this permission notice shall be
  * included in all copies or substantial portions of the Software.
  * 
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * 
  */
 package org.jmxtrans.embedded.util.pool;
 
JMX Enabled org.apache.commons.pool.impl.GenericKeyedObjectPool.

Author(s):
Cyrille Le Clerc
 
 public class ManagedGenericKeyedObjectPool<K, V> extends GenericKeyedObjectPool<K, V> implements ManagedGenericKeyedObjectPoolMBean<K,V> {
 
     public ManagedGenericKeyedObjectPool() {
         super();
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factory) {
         super(factory);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryConfig config) {
         super(factoryconfig);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActive) {
         super(factorymaxActive);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWait) {
         super(factorymaxActivewhenExhaustedActionmaxWait);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitboolean testOnBorrowboolean testOnReturn) {
         super(factorymaxActivewhenExhaustedActionmaxWaittestOnBorrowtestOnReturn);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdle) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdle);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdleboolean testOnBorrowboolean testOnReturn) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdletestOnBorrowtestOnReturn);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdleboolean testOnBorrowboolean testOnReturnlong timeBetweenEvictionRunsMillisint numTestsPerEvictionRunlong minEvictableIdleTimeMillisboolean testWhileIdle) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdletestOnBorrowtestOnReturntimeBetweenEvictionRunsMillisnumTestsPerEvictionRunminEvictableIdleTimeMillistestWhileIdle);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdleint maxTotalboolean testOnBorrowboolean testOnReturnlong timeBetweenEvictionRunsMillisint numTestsPerEvictionRunlong minEvictableIdleTimeMillisboolean testWhileIdle) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdlemaxTotaltestOnBorrowtestOnReturntimeBetweenEvictionRunsMillisnumTestsPerEvictionRunminEvictableIdleTimeMillistestWhileIdle);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdleint maxTotalint minIdleboolean testOnBorrowboolean testOnReturnlong timeBetweenEvictionRunsMillisint numTestsPerEvictionRunlong minEvictableIdleTimeMillisboolean testWhileIdle) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdlemaxTotalminIdletestOnBorrowtestOnReturntimeBetweenEvictionRunsMillisnumTestsPerEvictionRunminEvictableIdleTimeMillistestWhileIdle);
     }
 
     public ManagedGenericKeyedObjectPool(KeyedPoolableObjectFactory<K, V> factoryint maxActivebyte whenExhaustedActionlong maxWaitint maxIdleint maxTotalint minIdleboolean testOnBorrowboolean testOnReturnlong timeBetweenEvictionRunsMillisint numTestsPerEvictionRunlong minEvictableIdleTimeMillisboolean testWhileIdleboolean lifo) {
         super(factorymaxActivewhenExhaustedActionmaxWaitmaxIdlemaxTotalminIdletestOnBorrowtestOnReturntimeBetweenEvictionRunsMillisnumTestsPerEvictionRunminEvictableIdleTimeMillistestWhileIdlelifo);
     }
 
     @Override
     public int getNumIdle() {
         return super.getNumIdle();
     }
 
     @Override
     public int getNumActive() {
         return super.getNumActive();
     }
 
     @Override
     public boolean getLifo() {
         return super.getLifo();
     }
 
     @Override
    public boolean getTestWhileIdle() {
        return super.getTestWhileIdle();
    }
    @Override
    public long getMinEvictableIdleTimeMillis() {
        return super.getMinEvictableIdleTimeMillis();
    }
    @Override
    public int getNumTestsPerEvictionRun() {
        return super.getNumTestsPerEvictionRun();
    }
    @Override
    public long getTimeBetweenEvictionRunsMillis() {
        return super.getTimeBetweenEvictionRunsMillis();
    }
    @Override
    public boolean getTestOnReturn() {
        return super.getTestOnReturn();
    }
    @Override
    public boolean getTestOnBorrow() {
        return super.getTestOnBorrow();
    }
    @Override
    public int getMinIdle() {
        return super.getMinIdle();
    }
    @Override
    public int getMaxIdle() {
        return super.getMaxIdle();
    }
    @Override
    public long getMaxWait() {
        return super.getMaxWait();
    }
    @Override
    public int getMaxTotal() {
        return super.getMaxTotal();
    }
    @Override
    public int getMaxActive() {
        return super.getMaxActive();
    }
New to GrepCode? Check out our FAQ X