com.antiaction.mayhem.core
Interface IThreadPool

All Known Implementing Classes:
ThreadPool

public interface IThreadPool

ThreadPool Interface.

Version:
1.00
Author:
Nicholas Clarke

Method Summary
 void checkIn()
          Notify thread pool that a thread has gone inactive.
 void checkOut()
          Notify thread bool that a thread has gone active.
 boolean init(java.util.HashMap props)
          Initialize object with specified properties.
 void register()
          Notify thread pool that a new thread is running.
 void setThreadMold(IThreadWorker _threadWorker)
          Sets the Thread mold for this ThreadPool, which is used either directly or for cloning.
 boolean start()
          Activate the broker.
 boolean stop()
          Callback to let threads know they should shutdown.
 void unregister()
          Notify thread pool that a thread has stopped.
 

Method Detail

init

boolean init(java.util.HashMap props)
Initialize object with specified properties.

Parameters:
props - init properties.

setThreadMold

void setThreadMold(IThreadWorker _threadWorker)
Sets the Thread mold for this ThreadPool, which is used either directly or for cloning. The worker object must be initialized and the clone implementation must re-init the clone to an identical state.

Parameters:
_threadWorker - Set the Thread mold for this broker.

start

boolean start()
Activate the broker.


register

void register()
Notify thread pool that a new thread is running.

See Also:
unregister()

unregister

void unregister()
Notify thread pool that a thread has stopped.

See Also:
register()

checkIn

void checkIn()
Notify thread pool that a thread has gone inactive.

See Also:
checkOut()

checkOut

void checkOut()
Notify thread bool that a thread has gone active.

See Also:
checkIn()

stop

boolean stop()
Callback to let threads know they should shutdown. (random victims)



Copyright © 2001-2004 Nicholas Clarke. All Rights Reserved.