Struct mz_compute_client::controller::Instance
source · [−]struct Instance<T> {
replicas: ActiveReplication<T>,
collections: BTreeMap<GlobalId, CollectionState<T>>,
arranged_logs: BTreeMap<LogVariant, GlobalId>,
peeks: BTreeMap<Uuid, (GlobalId, T)>,
}
Expand description
The state we keep for a compute instance.
Fields
replicas: ActiveReplication<T>
The replicas of this compute instance.
collections: BTreeMap<GlobalId, CollectionState<T>>
Tracks expressed since
and received upper
frontiers for indexes and sinks.
arranged_logs: BTreeMap<LogVariant, GlobalId>
IDs of arranged log sources maintained by this compute instance.
peeks: BTreeMap<Uuid, (GlobalId, T)>
Currently outstanding peeks: identifiers and timestamps.
Implementations
sourceimpl<T> Instance<T>
impl<T> Instance<T>
sourcefn collection(&self, id: GlobalId) -> Result<&CollectionState<T>, ComputeError>
fn collection(&self, id: GlobalId) -> Result<&CollectionState<T>, ComputeError>
Acquire a handle to the collection state associated with id
.
sourcefn collection_mut(
&mut self,
id: GlobalId
) -> Result<&mut CollectionState<T>, ComputeError>
fn collection_mut(
&mut self,
id: GlobalId
) -> Result<&mut CollectionState<T>, ComputeError>
Acquire a mutable handle to the collection state associated with id
.
sourcefn activate<'a>(
&'a mut self,
storage_controller: &'a mut dyn StorageController<Timestamp = T>
) -> ActiveInstance<'a, T>
fn activate<'a>(
&'a mut self,
storage_controller: &'a mut dyn StorageController<Timestamp = T>
) -> ActiveInstance<'a, T>
Acquire an ActiveInstance
by providing a storage controller.
sourceimpl<T> Instance<T>where
T: Timestamp + Lattice,
ComputeGrpcClient: ComputeClient<T>,
impl<T> Instance<T>where
T: Timestamp + Lattice,
ComputeGrpcClient: ComputeClient<T>,
fn new(
build_info: &'static BuildInfo,
arranged_logs: BTreeMap<LogVariant, GlobalId>,
max_result_size: u32
) -> Self
sourcefn initialization_complete(&mut self)
fn initialization_complete(&mut self)
Marks the end of any initialization commands.
Intended to be called by Controller
, rather than by other code (to avoid repeated calls).
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Instance<T>
impl<T> Send for Instance<T>where
T: Send,
impl<T> Sync for Instance<T>where
T: Send + Sync,
impl<T> Unpin for Instance<T>where
T: Unpin,
impl<T> !UnwindSafe for Instance<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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<T> Pointable for T
impl<T> Pointable for T
sourceimpl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
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
.