Skip to main content

AeronArchiveContext

Struct AeronArchiveContext 

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

Implementations§

Source§

impl AeronArchiveContext

Source§

impl AeronArchiveContext

Source

pub fn aeron_archive_connect( &self, timeout: Duration, ) -> Result<AeronArchive, AeronCError>

Blocking convenience wrapper around the async add operation.

Convenience for examples and tests only. It blocks the calling thread in a busy-poll loop until the resource is available or timeout elapses. In production, prefer the async_add_* variant and drive its poll() from your own event loop rather than blocking on a single operation.

§Production pattern (pseudo code)
// Don't block — drive the async poller from your loop
let poller = client.async_add_*(...)?;
loop {
    if let Some(resource) = poller.poll()? {
        break; // ready
    }
    do_other_work(); // service other subscriptions, timers, etc.
}

See poll_blocking on the async poller for the same caveat.

Source§

impl AeronArchiveContext

Source

pub fn new() -> Result<Self, AeronCError>

Create an AeronArchiveContext struct.

Source

pub fn set_aeron(&self, aeron: &Aeron) -> Result<i32, AeronCError>

Specify the client used for communicating with the local Media Driver.

This client will be closed with the AeronArchive is closed if aeron_archive_context_set_owns_aeron_client is true.

Source

pub fn get_aeron(&self) -> Aeron

Source

pub fn set_owns_aeron_client( &self, owns_aeron_client: bool, ) -> Result<i32, AeronCError>

Specify whether or not this context owns the client and, therefore, takes responsibility for closing it.

Source

pub fn get_owns_aeron_client(&self) -> bool

Source

pub fn set_aeron_directory_name( &self, aeron_directory_name: &CStr, ) -> Result<i32, AeronCError>

Specify the top level Aeron directory used for communication between the Aeron client and the Media Driver.

Source

pub fn get_aeron_directory_name(&self) -> &str

Source

pub fn set_control_request_channel( &self, control_request_channel: &CStr, ) -> Result<i32, AeronCError>

Specify the channel used for sending requests to the Aeron Archive.

Source

pub fn get_control_request_channel(&self) -> &str

Source

pub fn set_control_request_stream_id( &self, control_request_stream_id: i32, ) -> Result<i32, AeronCError>

Specify the stream used for sending requests to the Aeron Archive.

Source

pub fn get_control_request_stream_id(&self) -> i32

Source

pub fn set_control_response_channel( &self, control_response_channel: &CStr, ) -> Result<i32, AeronCError>

Specify the channel used for receiving responses from the Aeron Archive.

Source

pub fn get_control_response_channel(&self) -> &str

Source

pub fn set_control_response_stream_id( &self, control_response_stream_id: i32, ) -> Result<i32, AeronCError>

Specify the stream used for receiving responses from the Aeron Archive.

Source

pub fn get_control_response_stream_id(&self) -> i32

Source

pub fn set_recording_events_channel( &self, recording_events_channel: &CStr, ) -> Result<i32, AeronCError>

Specify the channel used for receiving recording events from the Aeron Archive.

Source

pub fn get_recording_events_channel(&self) -> &str

Source

pub fn set_recording_events_stream_id( &self, recording_events_stream_id: i32, ) -> Result<i32, AeronCError>

Specify the stream id used for recording events channel.

Source

pub fn get_recording_events_stream_id(&self) -> i32

Source

pub fn set_message_timeout_ns( &self, message_timeout_ns: u64, ) -> Result<i32, AeronCError>

Specify the message timeout, in nanoseconds, to wait for sending or receiving a message.

Source

pub fn get_message_timeout_ns(&self) -> u64

Source

pub fn set_message_retry_attempts( &self, message_retry_attempts: u32, ) -> Result<i32, AeronCError>

Specify the number of retry attempts when offering messages to the archive.

Source

pub fn get_message_retry_attempts(&self) -> u32

Source

pub fn set_control_term_buffer_length( &self, control_term_buffer_length: usize, ) -> Result<i32, AeronCError>

Specify the default term buffer length for the control request/response channels.

Source

pub fn get_control_term_buffer_length(&self) -> usize

Source

pub fn set_control_mtu_length( &self, control_mtu_length: usize, ) -> Result<i32, AeronCError>

Specify the default MTU length for the control request/response channels.

Source

pub fn get_control_mtu_length(&self) -> usize

Source

pub fn set_control_term_buffer_sparse( &self, control_term_buffer_sparse: bool, ) -> Result<i32, AeronCError>

Specify the default MTU length for the control request/response channels.

Source

pub fn get_control_term_buffer_sparse(&self) -> bool

Source

pub fn set_client_name(&self, value: &CStr) -> Result<i32, AeronCError>

Specify client name to identify this client on the archive side.

Source

pub fn get_client_name(&self) -> &str

Source

pub fn set_idle_strategy<AeronIdleStrategyFuncHandlerImpl: AeronIdleStrategyFuncCallback + 'static>( &self, idle_strategy_func: Option<AeronIdleStrategyFuncHandlerImpl>, ) -> Result<Option<Handler<AeronIdleStrategyFuncHandlerImpl>>, AeronCError>

Specify the idle strategy function and associated state used by the client between polling calls.

The callback is retained by the C client; this resource keeps it alive automatically. Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.

Source

pub fn set_credentials_supplier<AeronArchiveCredentialsFreeFuncHandlerImpl: AeronArchiveCredentialsFreeFuncCallback + 'static>( &self, encoded_credentials: aeron_archive_credentials_encoded_credentials_supplier_func_t, on_challenge: aeron_archive_credentials_challenge_supplier_func_t, on_free: Option<AeronArchiveCredentialsFreeFuncHandlerImpl>, ) -> Result<Option<Handler<AeronArchiveCredentialsFreeFuncHandlerImpl>>, AeronCError>

Specify the various credentials callbacks to use when connecting to the Aeron Archive.

The callback is retained by the C client; this resource keeps it alive automatically. Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.

Source

pub fn set_recording_signal_consumer<AeronArchiveRecordingSignalConsumerFuncHandlerImpl: AeronArchiveRecordingSignalConsumerFuncCallback + 'static>( &self, on_recording_signal: Option<AeronArchiveRecordingSignalConsumerFuncHandlerImpl>, ) -> Result<Option<Handler<AeronArchiveRecordingSignalConsumerFuncHandlerImpl>>, AeronCError>

Specify the callback to which recording signals are dispatched while polling for control responses.

The callback is retained by the C client; this resource keeps it alive automatically. Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.

Source

pub fn set_error_handler<AeronErrorHandlerHandlerImpl: AeronErrorHandlerCallback + 'static>( &self, error_handler: Option<AeronErrorHandlerHandlerImpl>, ) -> Result<Option<Handler<AeronErrorHandlerHandlerImpl>>, AeronCError>

Specify the callback to which errors are dispatched while executing archive client commands.

The callback is retained by the C client; this resource keeps it alive automatically. Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.

Source

pub fn set_delegating_invoker<AeronArchiveDelegatingInvokerFuncHandlerImpl: AeronArchiveDelegatingInvokerFuncCallback + 'static>( &self, delegating_invoker_func: Option<AeronArchiveDelegatingInvokerFuncHandlerImpl>, ) -> Result<Option<Handler<AeronArchiveDelegatingInvokerFuncHandlerImpl>>, AeronCError>

Specify the callback to be invoked in addition to any invoker used by the Aeron instance.

Useful when running in a low thread count environment.

The callback is retained by the C client; this resource keeps it alive automatically. Returns the created Handler for optional state access — safe to ignore. Closures with a matching signature are accepted directly.

Source

pub fn get_inner(&self) -> *mut aeron_archive_context_t

Source

pub unsafe fn get_inner_mut(&self) -> &mut aeron_archive_context_t

Mutable access to the underlying C struct, minted from &self: nothing prevents two live &mut at once, so the caller must ensure exclusive access for the lifetime of the returned reference.

§Safety

No other reference (& or &mut) to the underlying struct may be alive while the returned &mut is in use.

Source

pub fn get_inner_ref(&self) -> &aeron_archive_context_t

Trait Implementations§

Source§

impl Clone for AeronArchiveContext

Source§

fn clone(&self) -> AeronArchiveContext

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for AeronArchiveContext

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Deref for AeronArchiveContext

Source§

type Target = aeron_archive_context_stct

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<&AeronArchiveContext> for *mut aeron_archive_context_t

Source§

fn from(value: &AeronArchiveContext) -> Self

Converts to this type from the input type.
Source§

impl From<*const aeron_archive_context_stct> for AeronArchiveContext

Source§

fn from(value: *const aeron_archive_context_t) -> Self

Converts to this type from the input type.
Source§

impl From<*mut aeron_archive_context_stct> for AeronArchiveContext

Source§

fn from(value: *mut aeron_archive_context_t) -> Self

Converts to this type from the input type.
Source§

impl From<AeronArchiveContext> for *mut aeron_archive_context_t

Source§

fn from(value: AeronArchiveContext) -> Self

Converts to this type from the input type.
Source§

impl From<AeronArchiveContext> for aeron_archive_context_t

Source§

fn from(value: AeronArchiveContext) -> Self

Converts to this type from the input type.
Source§

impl From<aeron_archive_context_stct> for AeronArchiveContext

Source§

fn from(value: aeron_archive_context_t) -> Self

Converts to this type from the input type.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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 = 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.