pub struct CrashRecovery { /* private fields */ }Expand description
崩溃恢复管理器
Implementations§
Source§impl CrashRecovery
impl CrashRecovery
Sourcepub fn detect_unclean_shutdown(&self) -> Layer2Result<Option<CrashInfo>>
pub fn detect_unclean_shutdown(&self) -> Layer2Result<Option<CrashInfo>>
检测不正常关闭
返回崩溃信息(如果有)
Sourcepub fn recover_session(
&self,
session_id: &SessionId,
) -> Layer2Result<Option<RecoveryResult>>
pub fn recover_session( &self, session_id: &SessionId, ) -> Layer2Result<Option<RecoveryResult>>
恢复会话
从最新的有效检查点恢复
Sourcepub fn mark_session_active(&self, session_id: &SessionId) -> Layer2Result<()>
pub fn mark_session_active(&self, session_id: &SessionId) -> Layer2Result<()>
标记会话为活跃
Sourcepub fn mark_session_terminated(
&self,
session_id: &SessionId,
reason: &str,
) -> Layer2Result<()>
pub fn mark_session_terminated( &self, session_id: &SessionId, reason: &str, ) -> Layer2Result<()>
标记会话为终止
Auto Trait Implementations§
impl Freeze for CrashRecovery
impl RefUnwindSafe for CrashRecovery
impl Send for CrashRecovery
impl Sync for CrashRecovery
impl Unpin for CrashRecovery
impl UnsafeUnpin for CrashRecovery
impl UnwindSafe for CrashRecovery
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