pub struct MetadataStore { /* private fields */ }Expand description
Thread-safe metadata store wrapper
Implementations§
Source§impl MetadataStore
impl MetadataStore
pub fn new() -> Self
pub fn from_metadata(metadata: ClusterMetadata) -> Self
pub async fn read(&self) -> RwLockReadGuard<'_, ClusterMetadata>
pub async fn write(&self) -> RwLockWriteGuard<'_, ClusterMetadata>
pub async fn apply(&self, index: u64, cmd: MetadataCommand) -> MetadataResponse
pub async fn get_topic(&self, name: &str) -> Option<TopicState>
pub async fn get_partition(&self, id: &PartitionId) -> Option<PartitionState>
pub async fn epoch(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetadataStore
impl !RefUnwindSafe for MetadataStore
impl Send for MetadataStore
impl Sync for MetadataStore
impl Unpin for MetadataStore
impl UnsafeUnpin for MetadataStore
impl !UnwindSafe for MetadataStore
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