Skip to main content

PayloadArena

Struct PayloadArena 

Source
pub struct PayloadArena { /* private fields */ }
Expand description

One fleet-wide payload allocation table. Every producer allocates from its node’s exclusive lane, independent of which exchange side it currently holds.

Implementations§

Source§

impl PayloadArena

Source

pub fn open( fleet: Arc<Fleet>, incarnation: Incarnation, spec: PayloadArenaSpec, ) -> Result<Self>

Source

pub fn kind(&self) -> u8

Source

pub fn slot_size(&self) -> usize

Source

pub fn slots_per_node(&self) -> usize

Source

pub fn chunk_geometry(&self) -> ChunkGeometry

Source

pub fn plan_chunks(&self, data_bytes: usize) -> Result<ChunkPlan>

Source

pub fn plan_chunks_with( &self, data_bytes: usize, slots_per_chunk: usize, ) -> Result<ChunkPlan>

Source

pub fn wait_available(&self, payload_len: usize) -> Result<()>

Park this thread until a run large enough for payload_len may be available. Allocation still decides the race after the wake.

Source

pub fn is_available(&self, payload_len: usize) -> Result<bool>

Whether this producer lane currently has a contiguous run for the payload. This is only a readiness snapshot; allocation still decides a race between concurrent producers.

Source

pub fn poll_available( &self, payload_len: usize, cx: &mut Context<'_>, ) -> Poll<Result<()>>

Task readiness for this node’s payload credit. Credit returns are coalesced through one shared generation and one local driver.

Source

pub fn reset_all(&self)

Clear this arena only while the fleet is known quiescent. Normal attach and replacement never call this implicitly.

Source

pub fn node_dead(&self, node: NodeId, incarnation: Incarnation)

Reclaim only allocations owned by a process incarnation whose death was confirmed by the embedder. A producer’s unpublished or unread chunks and a dead reader’s held chunks return; a chunk already held by a surviving consumer remains that consumer’s.

Remove the arena’s SHM name. Existing mappings remain valid.

Trait Implementations§

Source§

impl Clone for PayloadArena

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.