pub trait TopNExecutorBase: Send + 'static {
type State: StateStore;
// Required methods
fn apply_chunk(
&mut self,
chunk: StreamChunk,
) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send;
fn flush_data(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<StateTablePostCommit<'_, Self::State>>> + Send;
fn try_flush_data(
&mut self,
) -> impl Future<Output = StreamExecutorResult<()>> + Send;
fn init(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<()>> + Send;
fn handle_watermark(
&mut self,
watermark: Watermark,
) -> impl Future<Output = Option<Watermark>> + Send;
// Provided methods
fn clear_cache(&mut self) { ... }
fn evict(&mut self) { ... }
}
Required Associated Types§
type State: StateStore
Required Methods§
sourcefn apply_chunk(
&mut self,
chunk: StreamChunk,
) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send
fn apply_chunk( &mut self, chunk: StreamChunk, ) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send
Apply the chunk to the dirty state and get the diffs.
TODO(rc): There can be a 2 times amplification in terms of the chunk size, so we may need to
allow apply_chunk
return a stream of chunks. Motivation is not quite strong though.
sourcefn flush_data(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<StateTablePostCommit<'_, Self::State>>> + Send
fn flush_data( &mut self, epoch: EpochPair, ) -> impl Future<Output = StreamExecutorResult<StateTablePostCommit<'_, Self::State>>> + Send
Flush the buffered chunk to the storage backend.
sourcefn try_flush_data(
&mut self,
) -> impl Future<Output = StreamExecutorResult<()>> + Send
fn try_flush_data( &mut self, ) -> impl Future<Output = StreamExecutorResult<()>> + Send
Flush the buffered chunk to the storage backend.
fn init( &mut self, epoch: EpochPair, ) -> impl Future<Output = StreamExecutorResult<()>> + Send
Provided Methods§
fn clear_cache(&mut self)
fn evict(&mut self)
Object Safety§
This trait is not object safe.