Example usage for org.apache.commons.pool.impl GenericObjectPool getLifo

List of usage examples for org.apache.commons.pool.impl GenericObjectPool getLifo

Introduction

In this page you can find the example usage for org.apache.commons.pool.impl GenericObjectPool getLifo.

Prototype

public synchronized boolean getLifo() 

Source Link

Document

Whether or not the idle object pool acts as a LIFO queue.

Usage

From source file:sce.Main.java

public String getConnectionPoolInfo() {
    JSONObject results_obj = new JSONObject();
    GenericObjectPool pool = connectionPool.getConnectionPool();

    results_obj.put("Lifo", pool.getLifo());
    results_obj.put("MaxActive", pool.getMaxActive());
    results_obj.put("MaxIdle", pool.getMaxIdle());
    results_obj.put("MaxWait", pool.getMaxWait());
    results_obj.put("MinEvictableIdleTimeMillis", pool.getMinEvictableIdleTimeMillis());
    results_obj.put("MinIdle", pool.getMinIdle());
    results_obj.put("NumActive", pool.getNumActive());
    results_obj.put("NumIdle", pool.getNumIdle());
    results_obj.put("NumTestsPerEvictionRun", pool.getNumTestsPerEvictionRun());
    results_obj.put("SoftMinEvictableIdleTimeMillis", pool.getSoftMinEvictableIdleTimeMillis());
    results_obj.put("TestOnBorrow", pool.getTestOnBorrow());
    results_obj.put("TestOnReturn", pool.getTestOnReturn());
    results_obj.put("TestWhileIdle", pool.getTestWhileIdle());
    results_obj.put("TimeBetweenEvictionRunsMillis", pool.getTimeBetweenEvictionRunsMillis());
    results_obj.put("WhenExhaustedAction", pool.getWhenExhaustedAction());

    return results_obj.toJSONString();
}