Hi Cem, Answers inline...
On Mon, 2008-03-31 at 06:02 +0900, Cem Uzunlar wrote: > Hi, > > 1) ExecutorService es = new OrderedThreadPoolExecutor(); > > is this a correct thread pool for using as a global thread pool? (For > IoServices and ExecutorFilters) Yes for ExecutorFilters. For IoServices, I recommed Executors.newCachedThreadPool(). > 2) NioSocketAcceptor acceptor = new NioSocketAcceptor(es, XXX); > > What must i write as the second parameter XXX ? (processor) You don't need to do that. > 3) What is the best core and maximum thread count for the > OrderedThreadPoolExecutor? (For a board game server application) > > 2 * Runtime.getRuntime().availableProcessors() + 1 for "IoServices + > ExecuterFilters" > > is that ok? Yes for IoService. For ExecutorFilter, you will have to experiment. You can even try to drop ExecutorFilter from your filter chain depending on what your application is going to do. HTH, -- Trustin Lee - Principal Software Engineer, JBoss, Red Hat -- what we call human nature is actually human habit -- http://gleamynode.net/
signature.asc
Description: This is a digitally signed message part
