Struct mz_persist::client::MultiWriteHandle
source · [−]pub struct MultiWriteHandle { /* private fields */ }
Expand description
A handle for writing to multiple streams.
Implementations
sourceimpl MultiWriteHandle
impl MultiWriteHandle
sourcepub fn err(&self) -> Option<Error>
pub fn err(&self) -> Option<Error>
Returns Some(Error)
in case any initialization operation on this MultiWriteHandle
resulted in an Error
.
sourcepub fn new<K: Codec, V: Codec>(handle: &StreamWriteHandle<K, V>) -> Self
pub fn new<K: Codec, V: Codec>(handle: &StreamWriteHandle<K, V>) -> Self
Returns a new MultiWriteHandle for the given stream.
sourcepub fn new_from_streams<K, V, H, I>(handles: I) -> Result<Self, Error> where
K: Codec,
V: Codec,
H: Borrow<StreamWriteHandle<K, V>>,
I: Iterator<Item = H>,
pub fn new_from_streams<K, V, H, I>(handles: I) -> Result<Self, Error> where
K: Codec,
V: Codec,
H: Borrow<StreamWriteHandle<K, V>>,
I: Iterator<Item = H>,
Returns a new MultiWriteHandle for the given streams.
Convenience function for when all the streams have matching K and V.
NOTE: This only returns an Error
in case the passed iterator contains no handles or when
passing in handles from different persist runtimes. All other errors are handled
internally.
sourcepub fn add_stream<K: Codec, V: Codec>(
&mut self,
handle: &StreamWriteHandle<K, V>
) -> Result<(), Error>
pub fn add_stream<K: Codec, V: Codec>(
&mut self,
handle: &StreamWriteHandle<K, V>
) -> Result<(), Error>
Adds the given stream to the set
NOTE: This only returns an Error
when passing in handles from different persist runtimes.
All other errors are handled internally.
sourcepub fn write_atomic<F: FnOnce(&mut AtomicWriteBuilder<'_>) -> Result<(), Error>>(
&self,
f: F
) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
pub fn write_atomic<F: FnOnce(&mut AtomicWriteBuilder<'_>) -> Result<(), Error>>(
&self,
f: F
) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
Atomically writes the given updates to the paired streams.
Either all of the writes will be made durable for replay or none of them will.
sourcepub fn seal(&self, ids: &[Id], upper: u64) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
pub fn seal(&self, ids: &[Id], upper: u64) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
Closes the streams at the given timestamp, migrating data strictly less than it into the trace.
Ids may not be duplicated (this is equivalent to sealing the stream twice at the same timestamp, which we currently disallow).
sourcepub fn seal_all(&self, upper: u64) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
pub fn seal_all(&self, upper: u64) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
Closes all contained streams at the given timestamp, migrating data strictly less than it into the trace.
sourcepub fn allow_compaction(
&self,
id_sinces: &[(Id, Antichain<u64>)]
) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
pub fn allow_compaction(
&self,
id_sinces: &[(Id, Antichain<u64>)]
) -> PFuture<SeqNo>ⓘNotable traits for PFuture<T>impl<T> Future for PFuture<T> type Output = Result<T, Error>;
Unblocks compaction for updates for the given streams at the paired
since
timestamp.
Ids may not be duplicated (this is equivalent to allowing compaction on the stream twice at the same timestamp, which we currently disallow).
Trait Implementations
sourceimpl Clone for MultiWriteHandle
impl Clone for MultiWriteHandle
sourcefn clone(&self) -> MultiWriteHandle
fn clone(&self) -> MultiWriteHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MultiWriteHandle
impl Debug for MultiWriteHandle
Auto Trait Implementations
impl !RefUnwindSafe for MultiWriteHandle
impl Send for MultiWriteHandle
impl Sync for MultiWriteHandle
impl Unpin for MultiWriteHandle
impl !UnwindSafe for MultiWriteHandle
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<T> ProgressEventTimestamp for T where
T: Data + Debug + Any,
impl<T> ProgressEventTimestamp for T where
T: Data + Debug + Any,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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