pub struct PartitionHandle { /* private fields */ }Expand description
User-facing partition handle. Reads access status from shared atomics.
Implementations§
Source§impl PartitionHandle
impl PartitionHandle
pub fn new(state: Arc<PartitionState>, fault_tx: Sender<FaultType>) -> Self
Sourcepub fn read_status(&self) -> AccessStatus
pub fn read_status(&self) -> AccessStatus
Current read access status. Check before serving read requests.
Sourcepub fn write_status(&self) -> AccessStatus
pub fn write_status(&self) -> AccessStatus
Current write access status. Check before serving write requests.
Sourcepub fn report_fault(&self, fault_type: FaultType)
pub fn report_fault(&self, fault_type: FaultType)
Report a fault to trigger failover or restart.
Auto Trait Implementations§
impl Freeze for PartitionHandle
impl RefUnwindSafe for PartitionHandle
impl Send for PartitionHandle
impl Sync for PartitionHandle
impl Unpin for PartitionHandle
impl UnsafeUnpin for PartitionHandle
impl UnwindSafe for PartitionHandle
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request