groovyx.gpars.scheduler
Interface Pool

All Known Implementing Classes:
DefaultPGroup, DefaultPool, FJPool, NonDaemonPGroup, groovyx.gpars.group.PGroup, ResizeablePool, Scheduler

public interface Pool

Represents an actor's thread pool

Author:
Vaclav Pech Date: Feb 27, 2009

Field Summary
static java.lang.String POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER
           
static java.lang.String UNCAUGHT_EXCEPTION_OCCURRED_IN_ACTOR_POOL
           
 
Method Summary
 void execute(java.lang.Runnable task)
          schedules a new task for processing with the pool
 int getPoolSize()
          Retrieves the current thread pool size
 void resetDefaultSize()
          Sets the pool size to the default
 void resize(int poolSize)
          Resizes the thread pool to the specified value
 void shutdown()
          Gently stops the pool
 

Field Detail

POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER

static final java.lang.String POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER
See Also:
Constant Field Values

UNCAUGHT_EXCEPTION_OCCURRED_IN_ACTOR_POOL

static final java.lang.String UNCAUGHT_EXCEPTION_OCCURRED_IN_ACTOR_POOL
See Also:
Constant Field Values
Method Detail

resize

void resize(int poolSize)
Resizes the thread pool to the specified value

Parameters:
poolSize - The new pool size

resetDefaultSize

void resetDefaultSize()
Sets the pool size to the default


getPoolSize

int getPoolSize()
Retrieves the current thread pool size

Returns:
The pool size

execute

void execute(java.lang.Runnable task)
schedules a new task for processing with the pool

Parameters:
task - The task to schedule

shutdown

void shutdown()
Gently stops the pool


Copyright © 2008–2010 Václav Pech. All Rights Reserved.