pub struct OperatorContext<TimerState, OperatorState>{ /* private fields */ }Expand description
Context Available to an Arcon Operator
Implementations§
Source§impl<TimerState, OperatorState> OperatorContext<TimerState, OperatorState>
impl<TimerState, OperatorState> OperatorContext<TimerState, OperatorState>
pub fn state(&mut self) -> &mut OperatorState
Sourcepub fn log(&self) -> &ArconLogger
pub fn log(&self) -> &ArconLogger
Enable users to log within an Operator
`error!(ctx.log(), “Something bad happened!”);
Sourcepub fn current_time(&mut self) -> StateResult<u64>
pub fn current_time(&mut self) -> StateResult<u64>
Get current event time
Sourcepub fn schedule_at(
&mut self,
time: u64,
entry: TimerState,
) -> TimerResult<TimerState>
pub fn schedule_at( &mut self, time: u64, entry: TimerState, ) -> TimerResult<TimerState>
Schedule at a specific time in the future
Returns Ok if the entry was scheduled successfully
or Err(entry) if it has already expired.
Auto Trait Implementations§
impl<TimerState, OperatorState> Freeze for OperatorContext<TimerState, OperatorState>where
OperatorState: Freeze,
impl<TimerState, OperatorState> !RefUnwindSafe for OperatorContext<TimerState, OperatorState>
impl<TimerState, OperatorState> Send for OperatorContext<TimerState, OperatorState>
impl<TimerState, OperatorState> !Sync for OperatorContext<TimerState, OperatorState>
impl<TimerState, OperatorState> Unpin for OperatorContext<TimerState, OperatorState>where
OperatorState: Unpin,
impl<TimerState, OperatorState> !UnwindSafe for OperatorContext<TimerState, OperatorState>
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