|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovyx.gpars.scheduler.FJPool
groovyx.gpars.scheduler.ResizeableFJPool
class ResizeableFJPool extends FJPool
Represents the actors' thread pool, which performs tasks on behalf of the actors. Uses a ForkJoinPool from JSR-166y 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 int |
MAX_POOL_SIZE
|
private java.lang.Object |
lock
|
Fields inherited from class FJPool | |
---|---|
pool |
Constructor Summary | |
ResizeableFJPool()
Creates the pool with default number of threads. |
|
ResizeableFJPool(int poolSize)
Creates the pool with specified number of threads. |
Method Summary | |
---|---|
void
|
execute(java.lang.Runnable task)
schedules a new task for processing with the pool |
Methods inherited from class FJPool | |
---|---|
execute, getConfiguredPoolSize, getForkJoinPool, getPoolSize, resetDefaultSize, resize, shutdown |
Field Detail |
---|
private static final int MAX_POOL_SIZE
private final java.lang.Object lock
Constructor Detail |
---|
public ResizeableFJPool()
public ResizeableFJPool(int poolSize)
poolSize
- The required size of the pool
Method Detail |
---|
@Override public void execute(java.lang.Runnable task)
task
- The task to schedule
Copyright © 2008–2010 Václav Pech. All Rights Reserved.