pub struct ReplicaInfo { /* private fields */ }Expand description
A description of a replica on a particular broker.
Implementations§
Source§impl ReplicaInfo
impl ReplicaInfo
Sourcepub fn new(size: i64, offset_lag: i64, is_future: bool) -> Self
pub fn new(size: i64, offset_lag: i64, is_future: bool) -> Self
Creates a new ReplicaInfo.
§Arguments
size- the total size of the log segments in this replica in bytes.offset_lag- the lag of the log’s LEO with respect to the partition’s high watermark.is_future- whether this replica has been created by anAlterReplicaLogDirsRequest.
Sourcepub fn size(&self) -> i64
pub fn size(&self) -> i64
Returns the total size of the log segments in this replica in bytes.
This value does not include the size of data stored in remote storage.
Sourcepub fn offset_lag(&self) -> i64
pub fn offset_lag(&self) -> i64
Returns the lag of the log’s LEO with respect to the partition’s high watermark (if it is the current log for the partition) or the current replica’s LEO (if it is the future log for the partition).
Sourcepub fn is_future(&self) -> bool
pub fn is_future(&self) -> bool
Whether this replica has been created by an AlterReplicaLogDirsRequest
but has not yet replaced the current replica on the broker.
§Returns
true if this log is created by AlterReplicaLogDirsRequest and will replace the current log of the replica at some time in the future.
Trait Implementations§
Source§impl Clone for ReplicaInfo
impl Clone for ReplicaInfo
Source§fn clone(&self) -> ReplicaInfo
fn clone(&self) -> ReplicaInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReplicaInfo
impl Debug for ReplicaInfo
Auto Trait Implementations§
impl Freeze for ReplicaInfo
impl RefUnwindSafe for ReplicaInfo
impl Send for ReplicaInfo
impl Sync for ReplicaInfo
impl Unpin for ReplicaInfo
impl UnsafeUnpin for ReplicaInfo
impl UnwindSafe for ReplicaInfo
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
Mutably borrows from an owned value. Read more