pub struct ConcurrentConversionManager { /* private fields */ }Expand description
Thread-safe concurrent conversion manager
Implementations§
Source§impl ConcurrentConversionManager
impl ConcurrentConversionManager
Sourcepub fn new(
max_concurrent_operations: usize,
max_cached_models: usize,
config: ConversionConfig,
) -> Self
pub fn new( max_concurrent_operations: usize, max_cached_models: usize, config: ConversionConfig, ) -> Self
Create new concurrent conversion manager with specified concurrency limits
Sourcepub async fn convert_with_concurrency_control(
&self,
request: ConversionRequest,
) -> Result<ConversionResult>
pub async fn convert_with_concurrency_control( &self, request: ConversionRequest, ) -> Result<ConversionResult>
Process conversion request with thread-safe concurrency control and metrics tracking
Sourcepub async fn get_metrics(&self) -> ConcurrentConversionMetrics
pub async fn get_metrics(&self) -> ConcurrentConversionMetrics
Get current conversion metrics snapshot
Sourcepub async fn get_operation_state(&self) -> OperationState
pub async fn get_operation_state(&self) -> OperationState
Get current operation state snapshot with active operations
Sourcepub async fn update_config(&self, new_config: ConversionConfig) -> Result<()>
pub async fn update_config(&self, new_config: ConversionConfig) -> Result<()>
Update configuration with thread-safe write lock
Sourcepub async fn get_config(&self) -> ConversionConfig
pub async fn get_config(&self) -> ConversionConfig
Get current configuration snapshot with thread-safe read lock
Sourcepub async fn health_check(&self) -> HashMap<String, String>
pub async fn health_check(&self) -> HashMap<String, String>
Perform health check and return status metrics for monitoring
Auto Trait Implementations§
impl Freeze for ConcurrentConversionManager
impl !RefUnwindSafe for ConcurrentConversionManager
impl Send for ConcurrentConversionManager
impl Sync for ConcurrentConversionManager
impl Unpin for ConcurrentConversionManager
impl UnsafeUnpin for ConcurrentConversionManager
impl !UnwindSafe for ConcurrentConversionManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more