Groovy Documentation

gpars.scheduler
[Java] Class Scheduler

java.lang.Object
  gpars.scheduler.Scheduler
All Implemented Interfaces:
Pool

public final class Scheduler

Prototype of self-regulated thread pooled scheduler

Self regulation happened according to following rules - worker thread, which had nothing to do 10 seconds dies - if no tasks were taken for processing during last 0.5sec new worker starts


Constructor Summary
Scheduler()

Scheduler(int coreSize)

 
Method Summary
void execute(Runnable task)

Runnable loop(Runnable operation)

void resetDefaultSize()

void resize(int poolSize)

void shutdown()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

Scheduler

public Scheduler()


Scheduler

public Scheduler(int coreSize)


 
Method Detail

execute

public void execute(Runnable task)


loop

public Runnable loop(Runnable operation)


resetDefaultSize

public void resetDefaultSize()


resize

public void resize(int poolSize)


shutdown

@SuppressWarnings({"ObjectAllocationInLoop"})
public void shutdown()


 

Groovy Documentation