Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
MemoryConsumer in datafusion::execution::memory_manager - Rust
[go: Go Back, main page]

pub trait MemoryConsumer: Send + Sync {
    fn name(&self) -> String;
    fn id(&self) -> &MemoryConsumerId;
    fn memory_manager(&self) -> Arc<MemoryManager>;
    fn type_(&self) -> &ConsumerType;
    fn spill<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn mem_used(&self) -> usize; fn partition_id(&self) -> usize { ... } fn try_grow<'life0, 'async_trait>(
        &'life0 self,
        required: usize
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } fn shrink(&self, freed: usize) { ... } }
Expand description

A memory consumer that either takes up memory (of type ConsumerType::Tracking) or grows/shrinks memory usage based on available memory (of type ConsumerType::Requesting).

Required Methods

Display name of the consumer

Unique id of the consumer

Ptr to MemoryManager

Type of the consumer

Spill in-memory buffers to disk, free memory, return the previous used

Current memory used by this consumer

Provided Methods

Partition that the consumer belongs to

Grow memory by required to buffer more data in memory, this may trigger spill before grow when the memory threshold is reached for this consumer.

Return freed memory to the memory manager, may wake up other requesters waiting for their minimum memory quota.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Implementors