Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata


        }
       
        pool.shutdown();       
        pool.awaitTermination(1000, TimeUnit.MILLISECONDS);
        assertTrue(pool.isTerminated());
        WorkerPoolStatisticsMetadata stats = pool.getStats();
        assertEquals(10, stats.getTotalCompleted());
        assertEquals("Expected threads to be maxed out", MAX_THREADS, stats.getHighestActiveThreads()); //$NON-NLS-1$
    }
View Full Code Here


            }
        }
       
        pool.shutdown();               
       
        WorkerPoolStatisticsMetadata stats = pool.getStats();
        assertEquals("Expected 1 thread for serial execution", 1, stats.getHighestActiveThreads()); //$NON-NLS-1$
       
        pool.awaitTermination(1000, TimeUnit.MILLISECONDS);
    }
View Full Code Here

  public int getLargestPoolSize() {
    return this.highestActiveCount;
  }
 
  public WorkerPoolStatisticsMetadata getStats() {
    WorkerPoolStatisticsMetadata stats = new WorkerPoolStatisticsMetadata();
    stats.setName(poolName);
    stats.setQueued(queue.size());
    stats.setHighestQueued(highestQueueSize);
    stats.setActiveThreads(getActiveCount());
    stats.setMaxThreads(this.maximumPoolSize);
    stats.setTotalSubmitted(getSubmittedCount());
    stats.setHighestActiveThreads(getLargestPoolSize());
    stats.setTotalCompleted(getCompletedCount());
    return stats;
  }
View Full Code Here

TOP

Related Classes of org.teiid.adminapi.impl.WorkerPoolStatisticsMetadata

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.