pub struct FlushOptions
pub flush_interval: i32,
pub flush_when_full: bool,
Options for controlling automatic flush behavior.
Fields
flush_interval: i32Time interval in seconds for automatic periodic flush. Set to -1 (NO_PERIODIC_FLUSH) to disable automatic flush.
flush_when_full: boolWhat the timed flush sends: if true (the default) only queues that have reached the batch size; if false, every buffered record regardless of queue fullness.
Only the timed flush reads this; BulkInserter::flush and BulkInserter::close always send everything. Because the insert paths already send a queue the moment it fills, a timed flush with true usually finds nothing to send. Use false if the timer should push partial batches out.
Implementations
impl FlushOptions
pub const NO_PERIODIC_FLUSH: i32 = -1
Constant indicating no periodic flush (-1).
pub const FLUSH_WHEN_FULL: bool = true
Default value for flush_when_full.
Creates FlushOptions with specified values.
pub fn is_flush_when_full(&self) -> bool
Whether the timed flush sends only queues that have reached the batch size.
pub fn set_flush_when_full(&mut self, flush_when_full: bool)
Sets whether the timed flush sends only queues that have reached the batch size.
pub fn flush_interval(&self) -> i32
The timed flush interval, in seconds.
pub fn set_flush_interval(&mut self, flush_interval: i32)
Sets the timed flush interval, in seconds; the value is kept as given.
Trait Implementations
impl Clone for FlushOptions
fn clone(&self) -> FlushOptions
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Debug for FlushOptions
impl Default for FlushOptions
impl Eq for FlushOptions
impl PartialEq for FlushOptions
fn eq(&self, other: &FlushOptions) -> bool
self and other values to be equal, and is used by ==.