pub struct AeronArchiveReplayMerge { /* private fields */ }
Implementations§
Source§impl AeronArchiveReplayMerge
impl AeronArchiveReplayMerge
Sourcepub fn new(
subscription: &AeronSubscription,
aeron_archive: &AeronArchive,
replay_channel: &str,
replay_destination: &str,
live_destination: &str,
recording_id: i64,
start_position: i64,
epoch_clock: c_longlong,
merge_progress_timeout_ms: i64,
) -> Result<Self, AeronCError>
pub fn new( subscription: &AeronSubscription, aeron_archive: &AeronArchive, replay_channel: &str, replay_destination: &str, live_destination: &str, recording_id: i64, start_position: i64, epoch_clock: c_longlong, merge_progress_timeout_ms: i64, ) -> Result<Self, AeronCError>
Create an AeronArchiveReplayMerge
to manage the merging of a replayed stream into a live stream.
§Parameters
-
replay_merge
theAeronArchiveReplayMerge
to create and initialize -
subscription
the subscription to use for the replay and live stream. Must be a multi-destination subscription -
aeron_archive
the archive client -
replay_channel
the channel to use for the replay -
replay_destination
the replay channel to use for the destination added by the subscription -
live_destination
the live stream channel to use for the destination added by the subscription -
recording_id
the recording id of the archive to replay -
start_position
the start position of the replay -
epoch_clock
the clock to use for progress checks -
merge_progress_timeout_ms
the timeout to use for progress checks
§Return
0 for success, -1 for failure
Sourcepub fn close(&self) -> Result<i32, AeronCError>
pub fn close(&self) -> Result<i32, AeronCError>
Sourcepub fn poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>(
&self,
handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>,
fragment_limit: c_int,
) -> Result<i32, AeronCError>
pub fn poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>( &self, handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>, fragment_limit: c_int, ) -> Result<i32, AeronCError>
Poll the image used for the merging replay and live stream. The aeron_archive_replay_merge_do_work will be called before the poll so that processing of the merge can be done.
§Parameters
-
handler
the handler to call for incoming fragments -
clientd
the clientd to provide to the handler -
fragment_limit
the max number of fragments to process before returning
§Return
= 0 indicates the number of fragments processed, -1 for failure
Sourcepub fn poll_once<AeronFragmentHandlerHandlerImpl: FnMut(&[u8], AeronHeader)>(
&self,
handler: AeronFragmentHandlerHandlerImpl,
fragment_limit: c_int,
) -> Result<i32, AeronCError>
pub fn poll_once<AeronFragmentHandlerHandlerImpl: FnMut(&[u8], AeronHeader)>( &self, handler: AeronFragmentHandlerHandlerImpl, fragment_limit: c_int, ) -> Result<i32, AeronCError>
Poll the image used for the merging replay and live stream. The aeron_archive_replay_merge_do_work will be called before the poll so that processing of the merge can be done.
§Parameters
-
handler
the handler to call for incoming fragments -
clientd
the clientd to provide to the handler -
fragment_limit
the max number of fragments to process before returning
§Return
= 0 indicates the number of fragments processed, -1 for failure
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
Sourcepub fn image(&self) -> AeronImage
pub fn image(&self) -> AeronImage
Sourcepub fn has_failed(&self) -> bool
pub fn has_failed(&self) -> bool
Sourcepub fn is_live_added(&self) -> bool
pub fn is_live_added(&self) -> bool
Is the live destination added to the subscription?
§Return
true if the live destination is added to the subscription
pub fn get_inner(&self) -> *mut aeron_archive_replay_merge_t
Trait Implementations§
Source§impl Clone for AeronArchiveReplayMerge
impl Clone for AeronArchiveReplayMerge
Source§fn clone(&self) -> AeronArchiveReplayMerge
fn clone(&self) -> AeronArchiveReplayMerge
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more