Package com.avaje.ebeaninternal.server.lib.sql.DataSourcePool

Examples of com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.Status


      Thread.sleep(10000);
      pool.getStatistics(true);

      Thread.sleep(30000);

      Status status = pool.getStatus(false);
      System.out.println(status);

      pool.shutdown(false);

    } catch (Exception e) {
View Full Code Here


        this.lock = new ReentrantLock(false);
        this.notEmpty = lock.newCondition();
    }
   
    private Status createStatus() {
        return new Status(name, minSize, maxSize, freeList.size(), busyList.size(), waitingThreads, highWaterMark, waitCount, hitCount);       
    }
View Full Code Here

   
    public Status getStatus(boolean reset) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Status s = createStatus();
            if (reset){
                highWaterMark = busyList.size();
                hitCount = 0;
                waitCount = 0;
            }
View Full Code Here

    public void shutdown() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            doingShutdown = true;
            Status status = createStatus();
            DataSourcePoolStatistics statistics = pool.getStatistics(false);
            logger.debug("DataSourcePool [{}] shutdown {} - Statistics {}", name, status, statistics);
           
            closeFreeConnections(true);
       
View Full Code Here

     */
    public void reset(long leakTimeMinutes) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Status status = createStatus();
            logger.info("Reseting DataSourcePool [{}] {}", name, status);
            lastResetTime = System.currentTimeMillis();

            closeFreeConnections(false);
            closeBusyConnections(leakTimeMinutes);
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.Status

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.