pub struct NodeRuntime { /* private fields */ }Implementations§
Source§impl NodeRuntime
impl NodeRuntime
pub fn open( config: NodeConfig, consensus: Arc<ThreeNodeConsensus>, peer_candidates: &[&dyn LogPeer], ) -> Result<Self, NodeError>
pub fn open_cancellable( config: NodeConfig, consensus: Arc<ThreeNodeConsensus>, peer_candidates: &[&dyn LogPeer], startup: &StartupIoContext, ) -> Result<Self, NodeError>
pub fn write( &self, request_id: &str, key: &str, value: &str, ) -> Result<WriteResponse, NodeError>
pub fn execute_sql( &self, command: SqlCommand, ) -> Result<WriteResponse, NodeError>
Sourcepub fn execute_sql_batch(
&self,
commands: Vec<SqlCommand>,
) -> Result<Vec<Result<SqlExecuteResponse, NodeError>>, NodeError>
pub fn execute_sql_batch( &self, commands: Vec<SqlCommand>, ) -> Result<Vec<Result<SqlExecuteResponse, NodeError>>, NodeError>
Executes an ordered, non-atomic batch of SQL commands.
All successful, previously unseen members that fit the replicated command byte cap share
one exact-base QWAL entry. Failed members are rolled back independently and later members
continue. The aggregate canonical input is limited to MAX_COMMAND_BYTES. The whole
vector is validated before the first write attempt, so an outer Err guarantees that
nothing was attempted.
pub fn read( &self, key: &str, consistency: ReadConsistency, ) -> Result<ReadResponse, NodeError>
pub fn query_sql( &self, statement: &SqlStatement, consistency: ReadConsistency, max_rows: u32, ) -> Result<SqlQueryResponse, NodeError>
pub fn applied_index(&self) -> Result<LogIndex, NodeError>
pub fn applied_hash(&self) -> Result<LogHash, NodeError>
pub fn cancel_operations(&self)
pub fn materialize_next_decision(&self) -> Result<bool, NodeError>
pub async fn run_background_materializer<F>( self: Arc<Self>, poll_interval: Duration, shutdown: F, ) -> Result<(), NodeError>
pub const fn config(&self) -> &NodeConfig
pub const fn consensus(&self) -> &Arc<ThreeNodeConsensus>
pub const fn log_store(&self) -> &FileLogStore
pub fn configuration_state(&self) -> Result<ConfigurationState, NodeError>
pub fn status(&self) -> Result<NodeStatus, NodeError>
pub fn stop_current_configuration_for_successor( &self, successor: &Membership, ) -> Result<StopInformation, NodeError>
pub fn activate_successor(&self) -> Result<LogEntry, NodeError>
pub fn activate_successor_if( &self, expected_config_id: u64, ) -> Result<LogEntry, NodeError>
pub fn log_root(&self) -> Result<LogAnchor, NodeError>
pub fn fetch_log( &self, request: FetchLogRequest, ) -> Result<FetchLogResponse, FetchLogError>
pub fn create_recovery_snapshot(&self) -> Result<RecoverySnapshot, NodeError>
pub async fn checkpoint_compact( &self, coordinator: &CheckpointCoordinator, ) -> Result<RecoveryAnchor, DurabilityError>
pub fn verify_snapshot_publication( &self, snapshot: &RecoverySnapshot, publication: &SnapshotRecord, ) -> Result<VerifiedSnapshotPublication, NodeError>
pub fn compact_log( &self, publication: &VerifiedSnapshotPublication, ) -> Result<(), NodeError>
pub fn is_ready(&self) -> bool
pub fn is_fatal(&self) -> bool
pub fn fatal_reason(&self) -> Option<String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NodeRuntime
impl !RefUnwindSafe for NodeRuntime
impl !UnwindSafe for NodeRuntime
impl Send for NodeRuntime
impl Sync for NodeRuntime
impl Unpin for NodeRuntime
impl UnsafeUnpin for NodeRuntime
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more