com.yammer.metrics.util
Class ThreadPools

java.lang.Object
  extended by com.yammer.metrics.util.ThreadPools

public class ThreadPools
extends Object


Constructor Summary
ThreadPools()
           
 
Method Summary
 ScheduledExecutorService newScheduledThreadPool(int poolSize, String name)
          Creates a new scheduled thread pool of a given size with the given name, or returns an existing thread pool if one was already created with the same name.
 void shutdownThreadPools()
          Shuts down all thread pools created by this class in an orderly fashion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPools

public ThreadPools()
Method Detail

newScheduledThreadPool

public ScheduledExecutorService newScheduledThreadPool(int poolSize,
                                                       String name)
Creates a new scheduled thread pool of a given size with the given name, or returns an existing thread pool if one was already created with the same name.

Parameters:
poolSize - the number of threads to create
name - the name of the pool
Returns:
a new ScheduledExecutorService

shutdownThreadPools

public void shutdownThreadPools()
Shuts down all thread pools created by this class in an orderly fashion.



Copyright © 2011. All Rights Reserved.