Skip to main content

PooledSenderCore

Struct PooledSenderCore 

Source
pub struct PooledSenderCore { /* private fields */ }

Implementations§

Source§

impl PooledSenderCore

Source

pub fn poll_error(&self) -> Result<Option<QwpWsSenderError>>

Poll the next server-rejection diagnostic recorded on this connection since the lease was borrowed. The pool’s error handler independently receives every rejection at record time.

Source

pub fn error_events_dropped(&self) -> Result<u64>

Diagnostics dropped from the connection’s bounded ring.

Source

pub fn must_close(&self) -> bool

Source

pub fn mark_must_close(&mut self)

Source

pub fn effective_frame_cap(&self) -> (usize, bool)

Return the current binding per-frame cap and whether the current connection advertised X-QWP-Max-Batch-Size (whether or not that value is the binding limit). The cap also includes the configured max_buf_size and store-and-forward segment capacity.

Source

pub fn flush(&mut self, chunk: &mut Chunk<'_>) -> Result<()>

Encode and publish chunk into the store-and-forward queue without waiting for a server completion boundary.

Source

pub fn flush_buffer(&mut self, buffer: &mut Buffer) -> Result<()>

Encode and publish a QWP/WebSocket row Buffer into the local store-and-forward queue. The buffer is cleared only after local publication succeeds.

Source

pub fn flush_buffer_and_keep(&mut self, buffer: &Buffer) -> Result<()>

Encode and publish a QWP/WebSocket row Buffer without clearing it.

Source

pub fn flush_buffer_and_get_fsn( &mut self, buffer: &mut Buffer, ) -> Result<Option<u64>>

Publish a QWP/WebSocket row Buffer, clear it after local acceptance, and return the frame sequence number. Empty buffers publish no frame and return None.

Source

pub fn flush_buffer_and_keep_and_get_fsn( &mut self, buffer: &Buffer, ) -> Result<Option<u64>>

Publish a QWP/WebSocket row Buffer without clearing it and return the frame sequence number. Empty buffers publish no frame and return None.

Source

pub fn flush_buffer_and_wait( &mut self, buffer: &mut Buffer, ack_level: AckLevel, ) -> Result<()>

Publish a QWP/WebSocket row Buffer as a completion boundary, clear it after local acceptance, and wait for every prior publication to reach ack_level. A wait failure after publication still leaves the buffer cleared because replay is owned by the store-and-forward queue.

Source

pub fn flush_and_get_fsn( &mut self, chunk: &mut Chunk<'_>, ) -> Result<Option<u64>>

Store-and-forward only: encode and publish chunk into the local SFA queue and return the last published frame sequence number. If a chunk is split into multiple frames, the returned FSN is the final frame boundary; cumulative ACK coverage of that boundary covers the whole chunk.

Source

pub fn flush_and_wait( &mut self, chunk: &mut Chunk<'_>, ack_level: AckLevel, ) -> Result<()>

Publish chunk as a completion boundary, then wait until every frame published before or by this call on this borrowed sender reaches ack_level.

The boundary is cumulative: a successful return means all prior no-wait flushes plus this one are acknowledged at ack_level. An empty chunk behaves exactly like Self::sync (it encodes a header-only frame).

AckLevel::Durable requires QuestDB Enterprise and a pool opened with request_durable_ack=on; otherwise the call is rejected up front (InvalidApiCall) before chunk is touched.

Failure contract: the ACK level is validated, then the frame is published, then the wait runs. If publication itself fails the chunk is untouched and retryable. Once publication succeeds chunk is cleared even if the later ACK wait fails — at which point delivery of the just published frame is unknown (it may be committed, rejected, or in flight) and the borrow should be dropped/reborrowed per the error class. There is no internal failover retry; replay is the caller’s responsibility.

Source

pub fn flush_arrow_batch_at_now<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

Encode and publish an Arrow RecordBatch without a per-row designated timestamp, explicitly delegating timestamp assignment to the server (each row is stamped on arrival).

This is the opt-in counterpart to Self::flush_arrow_batch_at_column. If your batch carries a real event-time column, prefer flush_arrow_batch_at_column — reaching for this method instead would discard that column’s role as the designated timestamp and silently substitute server arrival time, producing wrong partitions/order.

Source

pub fn flush_arrow_batch_at_now_and_get_fsn<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ) -> Result<Option<u64>>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

Store-and-forward only: Arrow counterpart of Self::flush_and_get_fsn for server-stamped batches.

Source

pub fn flush_arrow_batch_at_now_and_wait<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ack_level: AckLevel, ) -> Result<()>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

ACKing counterpart of Self::flush_arrow_batch_at_now: publish batch as a boundary, then wait for ack_level. The same boundary/durable/failure contract as Self::flush_and_wait applies.

Source

pub fn flush_arrow_batch_at_column<'t, T>( &mut self, table: T, batch: &RecordBatch, ts_column: ColumnName<'_>, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

Encode and publish an Arrow RecordBatch, sourcing the per-row designated timestamp from the named Timestamp(_) column of the batch.

Use Self::flush_arrow_batch_at_now to instead let the server stamp each row on arrival.

Source

pub fn flush_arrow_batch_at_scalar_nanos<'t, T>( &mut self, table: T, batch: &RecordBatch, nanos: i64, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

Encode and publish an Arrow RecordBatch with one scalar nanosecond-precision Unix epoch timestamp as every row’s designated timestamp, encoded as a repeated constant. Unlike Self::flush_arrow_batch_at_now the value is fixed at the caller, so resubmission is idempotent under DEDUP UPSERT KEYS. Rejects negative (pre-epoch) values.

Source

pub fn flush_arrow_batch_at_column_and_get_fsn<'t, T>( &mut self, table: T, batch: &RecordBatch, ts_column: ColumnName<'_>, overrides: &[ArrowColumnOverride<'_>], ) -> Result<Option<u64>>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

Store-and-forward only: Arrow counterpart of Self::flush_and_get_fsn for batches whose designated timestamp is sourced from ts_column.

Source

pub fn flush_arrow_batch_at_column_and_wait<'t, T>( &mut self, table: T, batch: &RecordBatch, ts_column: ColumnName<'_>, overrides: &[ArrowColumnOverride<'_>], ack_level: AckLevel, ) -> Result<()>
where T: TryInto<TableName<'t>>, Error: From<T::Error>,

ACKing counterpart of Self::flush_arrow_batch_at_column: publish batch as a boundary, then wait for ack_level. The same boundary/durable/failure contract as Self::flush_and_wait applies.

Source

pub fn sync(&mut self, ack_level: AckLevel) -> Result<()>

Source

pub fn wait(&mut self, ack_level: AckLevel, timeout: Duration) -> Result<()>

Store-and-forward only: wait up to timeout for every frame published so far to reach ack_level. timeout is a no-progress deadline — it fires only if the ack watermark fails to advance for that long; Duration::ZERO waits indefinitely. On expiry it returns a ErrorCode::FailoverRetry error and the queued frames are retained for replay.

Source

pub fn published_fsn(&self) -> Result<Option<u64>>

Store-and-forward only: return the highest frame sequence number published locally by this sender, or None if no frame has been published.

Source

pub fn acked_fsn(&self) -> Result<Option<u64>>

Store-and-forward only: return the highest frame sequence number completed by server ACK or server-side reject-and-continue, or None if no frame has completed.

Trait Implementations§

Source§

impl Debug for PooledSenderCore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V