Struct mz_timely_util::activator::RcActivator
source · pub struct RcActivator {
inner: Rc<RefCell<ActivatorInner>>,
}
Expand description
An shared handle to multiple activators with support for triggering and acknowledging activations.
Activations are only triggered once the activate
function has been called at least threshold
times, and then not again until ack
is called. This way, the RcActivator ensures two
properties:
- It does not enqueue more than one activation per activator, if there is only one activator registered with this RcActivator. Once multiple activators are registered, any ack will enable more activations.
- The threshold to activation avoids activations purely caused by previous activations. Each scheduling of a logging dataflow potentially creates additional log data, which needs to be processed. The threshold should ensure that multiple activations under no load cause the dataflow to be scheduled. For Materialize’s log dataflows, this number seems to be larger than 32, below we might risk that we do not cause monotonically decreasing work. A value of 64 or larger is recommended, as there is no harm in bigger values. The log dataflow will still pick up all its inputs once every introspection interval, and this activator only creates additional activations.
Fields§
§inner: Rc<RefCell<ActivatorInner>>
Implementations§
source§impl RcActivator
impl RcActivator
sourcepub fn new(name: String, threshold: usize) -> Self
pub fn new(name: String, threshold: usize) -> Self
Construct a new RcActivator with the given name and threshold.
The threshold determines now many activations to ignore until scheduling the activation.
sourcepub fn register(&self, activator: Activator)
pub fn register(&self, activator: Activator)
Register an additional Activator with this RcActivator.
Trait Implementations§
source§impl ActivatorTrait for RcActivator
impl ActivatorTrait for RcActivator
source§impl Clone for RcActivator
impl Clone for RcActivator
source§fn clone(&self) -> RcActivator
fn clone(&self) -> RcActivator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RcActivator
impl !RefUnwindSafe for RcActivator
impl !Send for RcActivator
impl !Sync for RcActivator
impl Unpin for RcActivator
impl !UnwindSafe for RcActivator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.