pub struct Batcher { /* private fields */ }
Expand description
The batching process begins when the batcher receives a job. It will then accept additional jobs, adding them to a batch with the first job, until a max batching time or max batch size is reached - whichever comes first. If the simultaneous arrival of multiple jobs causes the max batch size to be exceeded, then the excess jobs will spillover into the next batching period. In this case of excess jobs, the next batching period begins immediately after the release of the preceding batch. If there are no excess jobs, the batcher will become passive, and wait for a job arrival to initiate the batching process.
Implementations§
source§impl Batcher
impl Batcher
pub fn from_value(value: Value) -> Option<Box<dyn ReportableModel>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Batcher
impl<'de> Deserialize<'de> for Batcher
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl DevsModel for Batcher
impl DevsModel for Batcher
fn events_ext( &mut self, incoming_message: &ModelMessage, services: &mut Services ) -> Result<(), SimulationError>
fn events_int( &mut self, services: &mut Services ) -> Result<Vec<ModelMessage>, SimulationError>
fn time_advance(&mut self, time_delta: f64)
fn until_next_event(&self) -> f64
source§impl Reportable for Batcher
impl Reportable for Batcher
source§impl SerializableModel for Batcher
impl SerializableModel for Batcher
impl ReportableModel for Batcher
Auto Trait Implementations§
impl RefUnwindSafe for Batcher
impl Send for Batcher
impl Sync for Batcher
impl Unpin for Batcher
impl UnwindSafe for Batcher
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