com.sun.grizzly.threadpool
Interface WorkerThread

All Superinterfaces:
AttributeStorage, Runnable
All Known Implementing Classes:
DefaultWorkerThread

public interface WorkerThread
extends Runnable, AttributeStorage

Interface, which ThreadPool threads should implement

Author:
Alexey Stashok

Field Summary
static long UNLIMITED_TRANSACTION_TIMEOUT
           
 
Method Summary
 void destroy()
           
 AttributeHolder getAttributes()
          Get associated AttributeHolder.
 String getName()
           
 Thread getThread()
           
 long getTransactionTimeout(TimeUnit timeunit)
           
 AttributeHolder obtainAttributes()
          Get associated AttributeHolder.
 void setTransactionTimeout(long timeout, TimeUnit timeunit)
           
 void start()
           
 void stop()
           
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

UNLIMITED_TRANSACTION_TIMEOUT

static final long UNLIMITED_TRANSACTION_TIMEOUT
See Also:
Constant Field Values
Method Detail

start

void start()

stop

void stop()

destroy

void destroy()

getName

String getName()

getThread

Thread getThread()

getAttributes

AttributeHolder getAttributes()
Description copied from interface: AttributeStorage
Get associated AttributeHolder. Implementation may return null if AttributeHolder wasn't initialized yet.

Specified by:
getAttributes in interface AttributeStorage
Returns:
associated AttributeHolder. Implementation may return null if AttributeHolder wasn't initialized yet.

obtainAttributes

AttributeHolder obtainAttributes()
Description copied from interface: AttributeStorage
Get associated AttributeHolder. Unlike AttributeStorage.getAttributes() - method never returns null.

Specified by:
obtainAttributes in interface AttributeStorage
Returns:
associated AttributeHolder. Unlike AttributeStorage.getAttributes() - method never returns null.

getTransactionTimeout

long getTransactionTimeout(TimeUnit timeunit)

setTransactionTimeout

void setTransactionTimeout(long timeout,
                           TimeUnit timeunit)


Copyright © 2009 SUN Microsystems. All Rights Reserved.