A D E F G I L M N P Q R S T U V

A

add(int) - Method in class it.pixel.util.threads.ThreadPool
Called when the pool needs to grow

D

drawParams() - Method in class it.pixel.util.threads.ThreadPool
Retrieves the first object on the worklist, and deletes it from the worklist.

E

ensureIncrement(int) - Method in class it.pixel.util.threads.ThreadPool
First this method tries to set the value of increment alone by calling setLimits.
ensureMax(int) - Method in class it.pixel.util.threads.ThreadPool
First this method tries to set the value of max alone by calling setLimits.
ensureMaxFree(int) - Method in class it.pixel.util.threads.ThreadPool
First this method tries to set the value of maxFree alone by calling setLimits.
ensureMin(int) - Method in class it.pixel.util.threads.ThreadPool
First this method tries to set the value of min alone by calling setLimits.
ensureMinFree(int) - Method in class it.pixel.util.threads.ThreadPool
First this method tries to set the value of minFree alone by calling setLimits.
execute(Object) - Method in class it.pixel.util.threads.ThreadPool
Allocates a free thread from the freelist and starts the thread.

F

freeThreads - Variable in class it.pixel.util.threads.ThreadPool
Counts the number of inactive threads

G

getApproximateValue() - Method in class it.pixel.util.threads.Semaphore
Returns the current value of the counter.
getIncrement() - Method in class it.pixel.util.threads.ThreadPool
Gets the value of increment
getMax() - Method in class it.pixel.util.threads.ThreadPool
Gets the value of max
getMaxFree() - Method in class it.pixel.util.threads.ThreadPool
Gets the value of maxFree
getMin() - Method in class it.pixel.util.threads.ThreadPool
Gets the value of min
getMinFree() - Method in class it.pixel.util.threads.ThreadPool
Gets the value of minFree
getRunnableWithParams() - Method in class it.pixel.util.threads.ThreadPool
This method returns the RunnableWithParams instance passed to the constructor of this class.

I

increment - Variable in class it.pixel.util.threads.ThreadPool
The number of threads added to the end of the freelist when the number of free threads goes below the minimum
it.pixel.util.threads - package it.pixel.util.threads
 

L

lock() - Method in class it.pixel.util.threads.Semaphore
Waits for the counter to be positive, then decreases it by one and returns

M

main(String[]) - Static method in class it.pixel.util.threads.TestThreadPool
Deprecated. The main method.
managePoolSize() - Method in class it.pixel.util.threads.ThreadPool
This is the method executed by a worker thread that anynchronously increases the number of free threads in the pool as needed.
max - Variable in class it.pixel.util.threads.ThreadPool
The maximum number of threads over which no more can be created
maxFree - Variable in class it.pixel.util.threads.ThreadPool
The maximum number of free threads allowed
maxValue - Variable in class it.pixel.util.threads.Semaphore
The highest value this semaphore can grow.
min - Variable in class it.pixel.util.threads.ThreadPool
The minimum number of threads under which no more can be discarded
minFree - Variable in class it.pixel.util.threads.ThreadPool
The minimum number of free threads allowed

N

ncalls - Variable in class it.pixel.util.threads.TestThreadPool
Deprecated. The number of times a thread gets called

P

params - Variable in class it.pixel.util.threads.ThreadPool
The list of parameters to pass in FCFS order to the threads
pool - Variable in class it.pixel.util.threads.ThreadPool.PooledThread
The pool it belongs to
POOL_INCREMENT - Static variable in class it.pixel.util.threads.ThreadPool
Default number of threads added to the end of the freelist when the number of free threads goes below the minimum
POOL_MAX - Static variable in class it.pixel.util.threads.ThreadPool
Default maximum pool size
POOL_MAX_FREE - Static variable in class it.pixel.util.threads.ThreadPool
Default maximum number of free threads allowed
POOL_MIN - Static variable in class it.pixel.util.threads.ThreadPool
Default minimum pool size
POOL_MIN_FREE - Static variable in class it.pixel.util.threads.ThreadPool
Default minimum number of free threads allowed

Q

queueParams(Object) - Method in class it.pixel.util.threads.ThreadPool
Adds the specified object to the end of the worklist

R

run() - Method in class it.pixel.util.threads.ThreadPool.PooledThread
This method loops calling the pool drawParams() method and passing the result to the RunnableWithParams provided in the constructor, until there are no more parameters to process (drawParams() returns null).
run(ThreadPool, Object) - Method in interface it.pixel.util.threads.RunnableWithParams
This method is called in the executing context of a thread in the pool after another thread has called the execute() method of the ThreadPool instance.
RunnableWithParams - interface it.pixel.util.threads.RunnableWithParams.
Instead of implementing java.lang.Runnable, a class designed to be executed in a thread of the pool must implement this interface.
rwp - Variable in class it.pixel.util.threads.ThreadPool
The code to be executed by the threads of the pool.
rwp - Variable in class it.pixel.util.threads.ThreadPool.PooledThread
The user defined object to run

S

Semaphore - class it.pixel.util.threads.Semaphore.
This class is the implementation of a semaphore.
Semaphore() - Constructor for class it.pixel.util.threads.Semaphore
Same as Semaphore(0, Integer.MAX_VALUE)
Semaphore(int) - Constructor for class it.pixel.util.threads.Semaphore
Same as Semaphore(initialValue, Integer.MAX_VALUE)
Semaphore(int, int) - Constructor for class it.pixel.util.threads.Semaphore
Creates a new semaphore with specified values.
setLimits(int, int, int, int, int) - Method in class it.pixel.util.threads.ThreadPool
This method sets the limits for the number of threads in the pool.
shutdown - Variable in class it.pixel.util.threads.ThreadPool
A flag that tells the sizeManager when it is time to stop
shutdown() - Method in class it.pixel.util.threads.ThreadPool
It tells the sizeManager it's time to stop, and waits for it to die.
sizeManager - Variable in class it.pixel.util.threads.ThreadPool
A worker thread used by this class to adjust the freelist size.

T

testExecute() - Method in class it.pixel.util.threads.TestThreadPool
Deprecated.  
TestThreadPool - class it.pixel.util.threads.TestThreadPool.
Deprecated. This class isn't of any use for your program. Please write your own main method instead.
TestThreadPool() - Constructor for class it.pixel.util.threads.TestThreadPool
Deprecated.  
ThreadPool - class it.pixel.util.threads.ThreadPool.
This class is the only class you want to use directly.
ThreadPool.PooledThread - class it.pixel.util.threads.ThreadPool.PooledThread.
This class extends Thread and is the actual Runnable object.
ThreadPool.PooledThread(ThreadPool, RunnableWithParams) - Constructor for class it.pixel.util.threads.ThreadPool.PooledThread
 
ThreadPool(RunnableWithParams) - Constructor for class it.pixel.util.threads.ThreadPool
Creates the pool and initializes the limits with the repective default values.
ThreadPool(RunnableWithParams, int, int, int, int, int) - Constructor for class it.pixel.util.threads.ThreadPool
Creates the pool and initializes the limits with the specified values.
timetest(ThreadPool, int) - Method in class it.pixel.util.threads.TestThreadPool
Deprecated.  
timeToExit() - Method in class it.pixel.util.threads.ThreadPool
Tells whether the shutdown method has already been called or not.
totalThreads - Variable in class it.pixel.util.threads.ThreadPool
Keeps the total number of threads
totms - Variable in class it.pixel.util.threads.TestThreadPool
Deprecated. The sum of the milliseconds between the call of execute and the thread completion for all the threads

U

unlock() - Method in class it.pixel.util.threads.Semaphore
If the current value is less than the maximum value, it increases the counter by one, wakes up a thread waiting in the lock() method if there is one, and returns.

V

value - Variable in class it.pixel.util.threads.Semaphore
The current value of this semaphore.

A D E F G I L M N P Q R S T U V