Struct rusteron_archive::Aeron
source · pub struct Aeron { /* private fields */ }
Implementations§
source§impl Aeron
impl Aeron
sourcepub fn new(context: &AeronContext) -> Result<Self, AeronCError>
pub fn new(context: &AeronContext) -> Result<Self, AeronCError>
sourcepub fn start(&self) -> Result<i32, AeronCError>
pub fn start(&self) -> Result<i32, AeronCError>
Start an Aeron
. This may spawn a thread for the Client Conductor.
§Return
0 for success and -1 for error.
sourcepub fn main_do_work(&self) -> Result<i32, AeronCError>
pub fn main_do_work(&self) -> Result<i32, AeronCError>
Call the Conductor main do_work duty cycle once.
Client must have been created with use conductor invoker set to true.
§Return
0 for success and -1 for error.
sourcepub fn main_idle_strategy(&self, work_count: c_int)
pub fn main_idle_strategy(&self, work_count: c_int)
sourcepub fn close(&self) -> Result<i32, AeronCError>
pub fn close(&self) -> Result<i32, AeronCError>
sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
Determines if the client has been closed, e.g. via a driver timeout. Don’t call this method after calling aeron_close as that will have already freed the associated memory.
§Return
true if it has been closed, false otherwise.
sourcepub fn print_counters(
&self,
stream_out: Option<unsafe extern "C" fn(arg1: *const c_char)>,
)
pub fn print_counters( &self, stream_out: Option<unsafe extern "C" fn(arg1: *const c_char)>, )
Call stream_out to print the counter labels and values.
§Parameters
stream_out
to call for each label and value.
sourcepub fn context(&self) -> AeronContext
pub fn context(&self) -> AeronContext
Return the AeronContext
that is in use by the given client.
§Return
the AeronContext
for the given client or NULL for an error.
sourcepub fn next_correlation_id(&self) -> i64
pub fn next_correlation_id(&self) -> i64
sourcepub fn counters_reader(&self) -> AeronCountersReader
pub fn counters_reader(&self) -> AeronCountersReader
Return a reference to the counters reader of the given client.
The AeronCountersReader
is maintained by the client. And should not be freed.
§Return
AeronCountersReader
or NULL for error.
sourcepub fn add_available_counter_handler(
&self,
pair: &AeronAvailableCounterPair,
) -> Result<i32, AeronCError>
pub fn add_available_counter_handler( &self, pair: &AeronAvailableCounterPair, ) -> Result<i32, AeronCError>
sourcepub fn remove_available_counter_handler(
&self,
pair: &AeronAvailableCounterPair,
) -> Result<i32, AeronCError>
pub fn remove_available_counter_handler( &self, pair: &AeronAvailableCounterPair, ) -> Result<i32, AeronCError>
Remove a previously added handler to be called when a new counter becomes unavailable or goes away.
NOTE: This function blocks until the handler is removed by the client conductor thread.
§Parameters
pair
holding the handler to call and a clientd to pass when called.
§Return
0 for success and -1 for error
sourcepub fn add_close_handler(
&self,
pair: &AeronCloseClientPair,
) -> Result<i32, AeronCError>
pub fn add_close_handler( &self, pair: &AeronCloseClientPair, ) -> Result<i32, AeronCError>
sourcepub fn remove_close_handler(
&self,
pair: &AeronCloseClientPair,
) -> Result<i32, AeronCError>
pub fn remove_close_handler( &self, pair: &AeronCloseClientPair, ) -> Result<i32, AeronCError>
sourcepub fn version_full(&self) -> &str
pub fn version_full(&self) -> &str
sourcepub fn version_text(&self) -> &str
pub fn version_text(&self) -> &str
sourcepub fn version_major() -> Result<i32, AeronCError>
pub fn version_major() -> Result<i32, AeronCError>
sourcepub fn version_minor() -> Result<i32, AeronCError>
pub fn version_minor() -> Result<i32, AeronCError>
sourcepub fn version_patch() -> Result<i32, AeronCError>
pub fn version_patch() -> Result<i32, AeronCError>
sourcepub fn version_gitsha(&self) -> &str
pub fn version_gitsha(&self) -> &str
sourcepub fn nano_clock() -> i64
pub fn nano_clock() -> i64
Return time in nanoseconds for machine. Is not wall clock time.
§Return
nanoseconds since epoch for machine.
sourcepub fn epoch_clock() -> i64
pub fn epoch_clock() -> i64
sourcepub fn is_driver_active(
dirname: &str,
timeout_ms: i64,
log_func: aeron_log_func_t,
) -> bool
pub fn is_driver_active( dirname: &str, timeout_ms: i64, log_func: aeron_log_func_t, ) -> bool
sourcepub fn properties_buffer_load(buffer: &str) -> Result<i32, AeronCError>
pub fn properties_buffer_load(buffer: &str) -> Result<i32, AeronCError>
sourcepub fn properties_file_load(filename: &str) -> Result<i32, AeronCError>
pub fn properties_file_load(filename: &str) -> Result<i32, AeronCError>
sourcepub fn properties_http_load(url: &str) -> Result<i32, AeronCError>
pub fn properties_http_load(url: &str) -> Result<i32, AeronCError>
sourcepub fn properties_load(url_or_filename: &str) -> Result<i32, AeronCError>
pub fn properties_load(url_or_filename: &str) -> Result<i32, AeronCError>
Load properties based on URL or filename. If string contains file or http URL, it will attempt to load properties from a file or http as indicated. If not a URL, then it will try to load the string as a filename.
§Parameters
url_or_filename
to load properties from.
§Return
0 for success and -1 for error.
sourcepub fn errcode() -> Result<i32, AeronCError>
pub fn errcode() -> Result<i32, AeronCError>
Return current aeron error code (errno) for calling thread.
§Return
aeron error code for calling thread.
sourcepub fn errmsg(&self) -> &str
pub fn errmsg(&self) -> &str
Return the current aeron error message for calling thread.
§Return
aeron error message for calling thread.
sourcepub fn default_path(
path: *mut c_char,
path_length: usize,
) -> Result<i32, AeronCError>
pub fn default_path( path: *mut c_char, path_length: usize, ) -> Result<i32, AeronCError>
Get the default path used by the Aeron media driver.
§Parameters
-
path
buffer to store the path. -
path_length
space available in the buffer
§Return
-1 if there is an issue or the number of bytes written to path excluding the terminator \0
. If this
is equal to or greater than the path_length then the path has been truncated.
pub fn semantic_version_compose(major: u8, minor: u8, patch: u8) -> i32
pub fn semantic_version_major(version: i32) -> u8
pub fn semantic_version_minor(version: i32) -> u8
pub fn semantic_version_patch(version: i32) -> u8
pub fn randomised_int32() -> i32
pub fn get_inner(&self) -> *mut aeron_t
source§impl Aeron
impl Aeron
pub fn async_add_subscription<AeronAvailableImageHandlerImpl: AeronAvailableImageCallback, AeronUnavailableImageHandlerImpl: AeronUnavailableImageCallback>( &self, uri: &str, stream_id: i32, on_available_image_handler: Option<&Handler<AeronAvailableImageHandlerImpl>>, on_unavailable_image_handler: Option<&Handler<AeronUnavailableImageHandlerImpl>>, ) -> Result<AeronAsyncAddSubscription, AeronCError>
source§impl Aeron
impl Aeron
pub fn async_add_counter( &self, type_id: i32, key_buffer: &[u8], label_buffer: &str, ) -> Result<AeronAsyncAddCounter, AeronCError>
source§impl Aeron
impl Aeron
pub fn async_add_exclusive_publication( &self, uri: &str, stream_id: i32, ) -> Result<AeronAsyncAddExclusivePublication, AeronCError>
source§impl Aeron
impl Aeron
pub fn async_add_publication( &self, uri: &str, stream_id: i32, ) -> Result<AeronAsyncAddPublication, AeronCError>
§impl Aeron
impl Aeron
pub fn new_blocking( context: &AeronContext, timeout: Duration, ) -> Result<Self, AeronCError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aeron
impl !RefUnwindSafe for Aeron
impl !Send for Aeron
impl !Sync for Aeron
impl Unpin for Aeron
impl !UnwindSafe for Aeron
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)