public interface PerthreadManager
Modifier and Type | Method and Description |
---|---|
void |
addThreadCleanupListener(ThreadCleanupListener listener)
Adds a listener to the hub.
|
void |
cleanup()
Immediately performs a cleanup of the thread, notifying all listeners, then discarding all per-thread data
stored by the manager.
|
<T> PerThreadValue<T> |
createValue()
Creates a value using a unique internal key.
|
<T> T |
invoke(Invokable<T> invokable)
Returns the result from the invocation, providing a try...finally to cleanup after.
|
void |
run(Runnable runnable)
Invokes
Runnable.run() , providing a try...finally to cleanup after. |
void addThreadCleanupListener(ThreadCleanupListener listener)
cleanup()
.listener
- to addvoid cleanup()
<T> PerThreadValue<T> createValue()
void run(Runnable runnable)
Runnable.run()
, providing a try...finally to cleanup after.Copyright © 2003-2012 The Apache Software Foundation.