|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovyx.gpars.scheduler.DefaultPool
groovyx.gpars.scheduler.ResizeablePool
class ResizeablePool extends DefaultPool
Represents the actors' thread pool, which performs tasks on behalf of the actors. The actors' thread pool size defaults to the n + 1, where n is the number of processors/cores available on the machine. The VM parameter -Dgpars.poolsize can be used the configure the default size of the actors' thread pool. The resize() and resetDefaultSize() methods can be used to configure size of the thread pool at runtime.
Field Summary | |
---|---|
private static long |
KEEP_ALIVE_TIME
|
Constructor Summary | |
ResizeablePool(boolean daemon)
Creates the pool with default number of threads. |
|
ResizeablePool(boolean daemon, int poolSize)
Creates the pool with specified number of threads. |
Method Summary | |
---|---|
private static java.util.concurrent.ThreadPoolExecutor
|
createResizeablePool(boolean daemon, int poolSize)
Creates a fixed-thread pool of given size. |
Methods inherited from class DefaultPool | |
---|---|
createThreadName, execute, getExecutorService, getPoolSize, resetDefaultSize, resize, shutdown |
Field Detail |
---|
private static final long KEEP_ALIVE_TIME
Constructor Detail |
---|
public ResizeablePool(boolean daemon)
daemon
- Sets the daemon flag of threads in the pool.
public ResizeablePool(boolean daemon, int poolSize)
daemon
- Sets the daemon flag of threads in the pool.poolSize
- The required size of the pool
Method Detail |
---|
private static java.util.concurrent.ThreadPoolExecutor createResizeablePool(boolean daemon, int poolSize)
daemon
- Sets the daemon flag of threads in the pool.poolSize
- The required pool size
Copyright © 2008–2010 Václav Pech. All Rights Reserved.