org.sblim.cimclient.internal.util

Class ThreadPool.Worker

private static class ThreadPool.Worker extends Thread

Class Worker implements a worker thread used by the thread pool
Constructor Summary
Worker(ThreadPool pool, String name)
Ctor.
Method Summary
booleanassignTask(Runnable task)
Assigns a new task to the thread
longgetIdleTimeout()
Returns the idle timeout
voidkill()
Kills the thread
voidrun()
voidsetIdleTimeout(long pIdleTimeout)
Set the idle timeout
voidstart()

Constructor Detail

Worker

public Worker(ThreadPool pool, String name)
Ctor.

Parameters: pool The owning pool name The name of the thread

Method Detail

assignTask

public boolean assignTask(Runnable task)
Assigns a new task to the thread

Parameters: task The task

Returns: true if the task could be successfully assigned.

getIdleTimeout

public long getIdleTimeout()
Returns the idle timeout

Returns: The idle timeout

kill

public void kill()
Kills the thread

run

public void run()

setIdleTimeout

public void setIdleTimeout(long pIdleTimeout)
Set the idle timeout

Parameters: pIdleTimeout The new value

start

public void start()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.