public interface ThreadPoolPlugin
A marker superinterface indicating that an instance class is eligible to be sense and intercept some operations of the specific thread-pool instance.
Generally, any thread-pool that implements the ThreadPoolPluginSupport
can be register multiple plugins by ThreadPoolPluginSupport.register(cn.hippo4j.core.plugin.ThreadPoolPlugin),
and the plugin will provide some extension function of original
ThreadPoolExecutor does not support.
During runtime, plugins can dynamically modify some configurable parameters
and provide some runtime information by getPluginRuntime().
When the thread-pool is destroyed, the plugin will also be destroyed.
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getId()
Get id.
|
default PluginRuntime |
getPluginRuntime()
Get plugin runtime info.
|
default void |
start()
Callback when plugin register into manager
|
default void |
stop()
Callback when plugin unregister from manager
|
String getId()
default void start()
default void stop()
default PluginRuntime getPluginRuntime()
Copyright © 2022. All rights reserved.