pub struct ReplayWorkerManager { /* private fields */ }Implementations§
Source§impl ReplayWorkerManager
impl ReplayWorkerManager
pub fn new() -> Self
Sourcepub fn insert(&mut self, target_id: String, cancel_tx: Sender<()>)
pub fn insert(&mut self, target_id: String, cancel_tx: Sender<()>)
Registers a cancel channel without a join handle.
Used where the worker’s lifetime is managed elsewhere (or in tests). Such
workers are signalled on stop_all but not awaited. Prefer
Self::insert_with_handle for in-process workers so shutdown can join
them and avoid orphaned tasks.
Sourcepub fn insert_with_handle(
&mut self,
target_id: String,
cancel_tx: Sender<()>,
join: JoinHandle<()>,
)
pub fn insert_with_handle( &mut self, target_id: String, cancel_tx: Sender<()>, join: JoinHandle<()>, )
Registers a cancel channel together with the worker’s join handle so
stop_all can await the worker’s exit.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn snapshot(&self, target_count: usize) -> RuntimeStatusSnapshot
Sourcepub async fn stop_all(&mut self, log_prefix: &str)
pub async fn stop_all(&mut self, log_prefix: &str)
Stops every replay worker: it first signals cancellation to all of them, then strictly awaits each worker’s exit. A worker already awaiting a delivery acknowledgement is allowed to finish; aborting it at an arbitrary deadline could leave an acknowledged queue entry undeleted and make the replacement worker deliver it again. Signalling before joining lets all workers wind down concurrently. Legacy joinless registrations can only be signalled.
Trait Implementations§
Source§impl Debug for ReplayWorkerManager
impl Debug for ReplayWorkerManager
Source§impl Default for ReplayWorkerManager
impl Default for ReplayWorkerManager
Source§fn default() -> ReplayWorkerManager
fn default() -> ReplayWorkerManager
Auto Trait Implementations§
impl Freeze for ReplayWorkerManager
impl RefUnwindSafe for ReplayWorkerManager
impl Send for ReplayWorkerManager
impl Sync for ReplayWorkerManager
impl Unpin for ReplayWorkerManager
impl UnsafeUnpin for ReplayWorkerManager
impl UnwindSafe for ReplayWorkerManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request