pub struct PooledSenderCore { /* private fields */ }Implementations§
Source§impl PooledSenderCore
impl PooledSenderCore
Sourcepub fn poll_error(&self) -> Result<Option<QwpWsSenderError>>
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.
Sourcepub fn error_events_dropped(&self) -> Result<u64>
pub fn error_events_dropped(&self) -> Result<u64>
Diagnostics dropped from the connection’s bounded ring.
pub fn must_close(&self) -> bool
pub fn mark_must_close(&mut self)
Sourcepub fn effective_frame_cap(&self) -> (usize, bool)
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.
Sourcepub fn flush(&mut self, chunk: &mut Chunk<'_>) -> Result<()>
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.
Sourcepub fn flush_buffer(&mut self, buffer: &mut Buffer) -> Result<()>
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.
Sourcepub fn flush_buffer_and_keep(&mut self, buffer: &Buffer) -> Result<()>
pub fn flush_buffer_and_keep(&mut self, buffer: &Buffer) -> Result<()>
Encode and publish a QWP/WebSocket row Buffer without clearing it.
Sourcepub fn flush_buffer_and_get_fsn(
&mut self,
buffer: &mut Buffer,
) -> Result<Option<u64>>
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.
Sourcepub fn flush_buffer_and_keep_and_get_fsn(
&mut self,
buffer: &Buffer,
) -> Result<Option<u64>>
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.
Sourcepub fn flush_buffer_and_wait(
&mut self,
buffer: &mut Buffer,
ack_level: AckLevel,
) -> Result<()>
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.
Sourcepub fn flush_and_get_fsn(
&mut self,
chunk: &mut Chunk<'_>,
) -> Result<Option<u64>>
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.
Sourcepub fn flush_and_wait(
&mut self,
chunk: &mut Chunk<'_>,
ack_level: AckLevel,
) -> Result<()>
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.
Sourcepub fn flush_arrow_batch_at_now<'t, T>(
&mut self,
table: T,
batch: &RecordBatch,
overrides: &[ArrowColumnOverride<'_>],
) -> Result<()>
pub fn flush_arrow_batch_at_now<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
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.
Sourcepub fn flush_arrow_batch_at_now_and_get_fsn<'t, T>(
&mut self,
table: T,
batch: &RecordBatch,
overrides: &[ArrowColumnOverride<'_>],
) -> Result<Option<u64>>
pub fn flush_arrow_batch_at_now_and_get_fsn<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ) -> Result<Option<u64>>
Store-and-forward only: Arrow counterpart of Self::flush_and_get_fsn
for server-stamped batches.
Sourcepub fn flush_arrow_batch_at_now_and_wait<'t, T>(
&mut self,
table: T,
batch: &RecordBatch,
overrides: &[ArrowColumnOverride<'_>],
ack_level: AckLevel,
) -> Result<()>
pub fn flush_arrow_batch_at_now_and_wait<'t, T>( &mut self, table: T, batch: &RecordBatch, overrides: &[ArrowColumnOverride<'_>], ack_level: AckLevel, ) -> Result<()>
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.
Sourcepub fn flush_arrow_batch_at_column<'t, T>(
&mut self,
table: T,
batch: &RecordBatch,
ts_column: ColumnName<'_>,
overrides: &[ArrowColumnOverride<'_>],
) -> Result<()>
pub fn flush_arrow_batch_at_column<'t, T>( &mut self, table: T, batch: &RecordBatch, ts_column: ColumnName<'_>, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
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.
Sourcepub fn flush_arrow_batch_at_scalar_nanos<'t, T>(
&mut self,
table: T,
batch: &RecordBatch,
nanos: i64,
overrides: &[ArrowColumnOverride<'_>],
) -> Result<()>
pub fn flush_arrow_batch_at_scalar_nanos<'t, T>( &mut self, table: T, batch: &RecordBatch, nanos: i64, overrides: &[ArrowColumnOverride<'_>], ) -> Result<()>
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.
Sourcepub 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>>
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>>
Store-and-forward only: Arrow counterpart of Self::flush_and_get_fsn
for batches whose designated timestamp is sourced from ts_column.
Sourcepub 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<()>
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<()>
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.
pub fn sync(&mut self, ack_level: AckLevel) -> Result<()>
Sourcepub fn wait(&mut self, ack_level: AckLevel, timeout: Duration) -> Result<()>
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.
Sourcepub fn published_fsn(&self) -> Result<Option<u64>>
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.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PooledSenderCore
impl !UnwindSafe for PooledSenderCore
impl Freeze for PooledSenderCore
impl Send for PooledSenderCore
impl Sync for PooledSenderCore
impl Unpin for PooledSenderCore
impl UnsafeUnpin for PooledSenderCore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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