public final class Scheduler extends java.lang.Object
Prototype of self-regulated thread pooled scheduler
Self regulation happened according to following rules:
Modifiers | Name | Description |
---|---|---|
private class |
Scheduler.WatchdogThread |
|
private class |
Scheduler.WorkerThread |
Modifiers | Name | Description |
---|---|---|
private static long |
POKE_INTERVAL |
|
static java.lang.RuntimeException |
TERMINATE |
|
private long |
lastTaskPoke |
|
private java.util.concurrent.BlockingQueue<java.lang.Runnable> |
queue |
|
private long |
schedulerTime |
|
private boolean |
terminating |
|
private java.util.concurrent.atomic.AtomicInteger |
threadCount |
Type | Name and description |
---|---|
void |
execute(java.lang.Runnable task) |
int |
getPoolSize() Retrieves the current thread pool size |
java.lang.Runnable |
loop(java.lang.Runnable operation) |
void |
resetDefaultSize() |
void |
resize(int poolSize) |
void |
shutdown() |
private void |
startNewThread() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Retrieves the current thread pool size
Copyright © 2008–2014 Václav Pech. All Rights Reserved.