pub struct StorageMetadata { /* private fields */ }Expand description
Message storage metadata
Contains indexing and location information for messages in the Broker storage engine.
Implementations§
Source§impl StorageMetadata
impl StorageMetadata
Sourcepub fn new(
broker_name: CheetahString,
queue_id: i32,
queue_offset: i64,
commit_log_offset: i64,
store_timestamp: i64,
store_host: SocketAddr,
store_size: i32,
) -> Self
pub fn new( broker_name: CheetahString, queue_id: i32, queue_offset: i64, commit_log_offset: i64, store_timestamp: i64, store_host: SocketAddr, store_size: i32, ) -> Self
Creates new storage metadata
Sourcepub fn broker_name(&self) -> &str
pub fn broker_name(&self) -> &str
Gets the broker name
Sourcepub fn queue_offset(&self) -> i64
pub fn queue_offset(&self) -> i64
Gets the queue logical offset
Sourcepub fn commit_log_offset(&self) -> i64
pub fn commit_log_offset(&self) -> i64
Gets the CommitLog physical offset
Sourcepub fn store_timestamp(&self) -> i64
pub fn store_timestamp(&self) -> i64
Gets the storage timestamp
Sourcepub fn store_host(&self) -> SocketAddr
pub fn store_host(&self) -> SocketAddr
Gets the storage host address
Sourcepub fn store_size(&self) -> i32
pub fn store_size(&self) -> i32
Gets the storage size in bytes
Sourcepub fn store_host_bytes(&self) -> Bytes
pub fn store_host_bytes(&self) -> Bytes
Serializes store_host to bytes
Trait Implementations§
Source§impl Clone for StorageMetadata
impl Clone for StorageMetadata
Source§impl Debug for StorageMetadata
impl Debug for StorageMetadata
Source§impl Default for StorageMetadata
impl Default for StorageMetadata
impl Eq for StorageMetadata
Source§impl PartialEq for StorageMetadata
impl PartialEq for StorageMetadata
impl StructuralPartialEq for StorageMetadata
Auto Trait Implementations§
impl Freeze for StorageMetadata
impl RefUnwindSafe for StorageMetadata
impl Send for StorageMetadata
impl Sync for StorageMetadata
impl Unpin for StorageMetadata
impl UnsafeUnpin for StorageMetadata
impl UnwindSafe for StorageMetadata
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