Package com.google.code.yanf4j.core.impl

Examples of com.google.code.yanf4j.core.impl.PoolDispatcher


    PoolDispatcher dispatcher;


    @Before
    public void setUp() {
        this.dispatcher = new PoolDispatcher(10, 60, TimeUnit.SECONDS, new ThreadPoolExecutor.AbortPolicy(),"test");
    }
View Full Code Here


    @Test
    public void testDispatchReject() throws Exception {
        this.dispatcher.stop();
        PoolDispatcher.MAX_POOL_SIZE_FACTOR = 1;
        PoolDispatcher.POOL_QUEUE_SIZE_FACTOR = 1;
        this.dispatcher = new PoolDispatcher(1, 60, TimeUnit.SECONDS, new ThreadPoolExecutor.AbortPolicy(),"test");
        this.dispatcher.dispatch(new Runnable() {
            public void run() {
                while (!Thread.currentThread().isInterrupted()) {

                }
View Full Code Here

*/
public class DispatcherFactory {
  public static com.google.code.yanf4j.core.Dispatcher newDispatcher(
      int size, RejectedExecutionHandler rejectedExecutionHandler,String prefix) {
    if (size > 0) {
      return new PoolDispatcher(size, 60, TimeUnit.SECONDS,
          rejectedExecutionHandler,prefix);
    } else {
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of com.google.code.yanf4j.core.impl.PoolDispatcher

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.