pub struct ThreadComponentAdapter { /* private fields */ }Expand description
Adapter that converts ThreadManager to PluginThreadComponent
Implementations§
Source§impl ThreadComponentAdapter
impl ThreadComponentAdapter
pub fn new(component: Arc<ThreadManager>) -> Self
Trait Implementations§
Source§impl NerveComponent for ThreadComponentAdapter
impl NerveComponent for ThreadComponentAdapter
Source§fn id(&self) -> &ComponentId
fn id(&self) -> &ComponentId
Get component identifier
Source§fn component_type(&self) -> ComponentType
fn component_type(&self) -> ComponentType
Get component type
Source§fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if component is healthy
Source§fn get_statistics(&self) -> SystemStatistics
fn get_statistics(&self) -> SystemStatistics
Get component statistics
Source§fn reset_statistics(&mut self)
fn reset_statistics(&mut self)
Reset component statistics
Source§fn shutdown(&mut self) -> NerveResult<()>
fn shutdown(&mut self) -> NerveResult<()>
Shutdown the component
Source§impl PluginThreadComponent for ThreadComponentAdapter
impl PluginThreadComponent for ThreadComponentAdapter
Source§fn thread_count(&self) -> usize
fn thread_count(&self) -> usize
Get current thread count
Source§fn max_threads(&self) -> usize
fn max_threads(&self) -> usize
Get maximum allowed threads
Source§fn thread_utilization(&self) -> f64
fn thread_utilization(&self) -> f64
Get thread utilization percentage
Auto Trait Implementations§
impl Freeze for ThreadComponentAdapter
impl RefUnwindSafe for ThreadComponentAdapter
impl Send for ThreadComponentAdapter
impl Sync for ThreadComponentAdapter
impl Unpin for ThreadComponentAdapter
impl UnwindSafe for ThreadComponentAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more