org.apache.geronimo.system.threads
Interface ThreadPool

All Known Subinterfaces:
GeronimoExecutor
All Known Implementing Classes:
ThreadPool

public interface ThreadPool

Management interface for thread pools


Method Summary
 boolean awaitTermination(long timeout, TimeUnit unit)
           
 void execute(String consumerName, Runnable runnable)
          Executes work on behalf of a named client.
 int getActiveCount()
           
 int getMaximumPoolSize()
          Gets the maximum number of threads allowed for this thread pool
 int getPoolSize()
           
 

Method Detail

getPoolSize

int getPoolSize()

getMaximumPoolSize

int getMaximumPoolSize()
Gets the maximum number of threads allowed for this thread pool


getActiveCount

int getActiveCount()

awaitTermination

boolean awaitTermination(long timeout,
                         TimeUnit unit)
                         throws InterruptedException
Throws:
InterruptedException

execute

void execute(String consumerName,
             Runnable runnable)
             throws InterruptedException
Executes work on behalf of a named client. This helps the thread pool track who's using its threads.

Parameters:
consumerName - A name identifying the caller, to be used in the management statistics for this pool, etc.
runnable - The work to be done by a thread in the pool
Throws:
InterruptedException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.