Struct mz_dataflow_types::client::controller::ComputeControllerMut
source · [−]pub struct ComputeControllerMut<'a, T> { /* private fields */ }
Expand description
A mutable controller for a compute instance.
Implementations
sourceimpl<'a, T> ComputeControllerMut<'a, T> where
T: Timestamp + Lattice + Codec64,
impl<'a, T> ComputeControllerMut<'a, T> where
T: Timestamp + Lattice + Codec64,
sourcepub fn as_ref<'b>(&'b self) -> ComputeController<'b, T>
pub fn as_ref<'b>(&'b self) -> ComputeController<'b, T>
Constructs an immutable handle from this mutable handle.
sourcepub fn storage_mut(&mut self) -> &mut dyn StorageController<Timestamp = T>
pub fn storage_mut(&mut self) -> &mut dyn StorageController<Timestamp = T>
Acquires a mutable handle to a controller for the storage instance.
sourcepub fn add_replica(&mut self, id: ReplicaId, client: Box<dyn ComputeClient<T>>)
pub fn add_replica(&mut self, id: ReplicaId, client: Box<dyn ComputeClient<T>>)
Adds a new instance replica, by name.
pub fn get_replica_ids(&self) -> impl Iterator<Item = ReplicaId> + '_
sourcepub fn remove_replica(&mut self, id: ReplicaId)
pub fn remove_replica(&mut self, id: ReplicaId)
Removes an existing instance replica, by name.
sourcepub async fn create_dataflows(
&mut self,
dataflows: Vec<DataflowDescription<Plan<T>, (), T>>
) -> Result<(), ComputeError>
pub async fn create_dataflows(
&mut self,
dataflows: Vec<DataflowDescription<Plan<T>, (), T>>
) -> Result<(), ComputeError>
Creates and maintains the described dataflows, and initializes state for their output.
This method creates dataflows whose inputs are still readable at the dataflow as_of
frontier, and initializes the outputs as readable from that frontier onward.
It installs read dependencies from the outputs to the inputs, so that the input read
capabilities will be held back to the output read capabilities, ensuring that we are
always able to return to a state that can serve the output read capabilities.
sourcepub async fn drop_sinks(
&mut self,
identifiers: Vec<GlobalId>
) -> Result<(), ComputeError>
pub async fn drop_sinks(
&mut self,
identifiers: Vec<GlobalId>
) -> Result<(), ComputeError>
Drops the read capability for the sinks and allows their resources to be reclaimed.
sourcepub async fn drop_indexes(
&mut self,
identifiers: Vec<GlobalId>
) -> Result<(), ComputeError>
pub async fn drop_indexes(
&mut self,
identifiers: Vec<GlobalId>
) -> Result<(), ComputeError>
Drops the read capability for the indexes and allows their resources to be reclaimed.
sourcepub async fn peek(
&mut self,
id: GlobalId,
key: Option<Row>,
uuid: Uuid,
timestamp: T,
finishing: RowSetFinishing,
map_filter_project: SafeMfpPlan,
target_replica: Option<ReplicaId>
) -> Result<(), ComputeError>
pub async fn peek(
&mut self,
id: GlobalId,
key: Option<Row>,
uuid: Uuid,
timestamp: T,
finishing: RowSetFinishing,
map_filter_project: SafeMfpPlan,
target_replica: Option<ReplicaId>
) -> Result<(), ComputeError>
Initiate a peek request for the contents of id
at timestamp
.
sourcepub async fn cancel_peeks(
&mut self,
uuids: &BTreeSet<Uuid>
) -> Result<(), ComputeError>
pub async fn cancel_peeks(
&mut self,
uuids: &BTreeSet<Uuid>
) -> Result<(), ComputeError>
Cancels existing peek requests.
Canceling a peek is best effort. The caller may see any of the following after canceling a peek request:
-
A
PeekResponse::Rows
indicating that the cancellation request did not take effect in time and the query succeeded. -
A
PeekResponse::Canceled
affirming that the peek was canceled. -
No
PeekResponse
at all.
sourcepub async fn set_read_policy(
&mut self,
policies: Vec<(GlobalId, ReadPolicy<T>)>
) -> Result<(), ComputeError>
pub async fn set_read_policy(
&mut self,
policies: Vec<(GlobalId, ReadPolicy<T>)>
) -> Result<(), ComputeError>
Assigns a read policy to specific identifiers.
The policies are assigned in the order presented, and repeated identifiers should conclude with the last policy. Changing a policy will immediately downgrade the read capability if appropriate, but it will not “recover” the read capability if the prior capability is already ahead of it.
Identifiers not present in policies
retain their existing read policies.
Trait Implementations
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for ComputeControllerMut<'a, T>
impl<'a, T> Send for ComputeControllerMut<'a, T> where
T: Send,
impl<'a, T> !Sync for ComputeControllerMut<'a, T>
impl<'a, T> Unpin for ComputeControllerMut<'a, T>
impl<'a, T> !UnwindSafe for ComputeControllerMut<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<P, R> ProtoType<R> for P where
R: RustType<P>,
impl<P, R> ProtoType<R> for P where
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See RustType::from_proto
.
sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See RustType::into_proto
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more