[][src]Struct declarative_dataflow::server::Server

pub struct Server<T, Token> where
    T: Timestamp + Lattice,
    Token: Hash + Eq + Copy
{ pub config: Configuration, pub t0: Instant, pub context: Context<T>, pub interests: HashMap<String, HashSet<Token>>, pub probe: ProbeHandle<T>, pub scheduler: Rc<RefCell<Scheduler>>, // some fields omitted }

Server context maintaining globally registered arrangements and input handles.

Fields

config: Configuration

Server configuration.

t0: Instant

A timer started at the initation of the timely computation (copied from worker).

context: Context<T>

Implementation context.

interests: HashMap<String, HashSet<Token>>

Mapping from query names to interested client tokens.

probe: ProbeHandle<T>

Probe keeping track of overall dataflow progress.

scheduler: Rc<RefCell<Scheduler>>

Scheduler managing deferred operator activations.

Methods

impl<T, Token> Server<T, Token> where
    T: Timestamp + Lattice + Default + Rewind,
    Token: Hash + Eq + Copy
[src]

pub fn new(config: Configuration) -> Self[src]

Creates a new server state from a configuration.

pub fn new_at(config: Configuration, t0: Instant) -> Self[src]

Creates a new server state from a configuration with an additionally specified beginning of the computation: an instant in relation to which all durations will be measured.

pub fn builtins() -> Vec<Request>[src]

Returns commands to install built-in plans.

pub fn transact(
    &mut self,
    tx_data: Vec<TxData>,
    owner: usize,
    worker_index: usize
) -> Result<(), Error>
[src]

Handle a Transact request.

pub fn interest<S: Scope<Timestamp = T>>(
    &mut self,
    name: &str,
    scope: &mut S
) -> Result<Collection<S, Vec<Value>, isize>, Error>
[src]

Handles an Interest request.

pub fn register(&mut self, req: Register) -> Result<(), Error>[src]

Handle a Register request.

pub fn register_source<S: Scope<Timestamp = T>>(
    &mut self,
    source: Box<dyn Sourceable<S>>,
    scope: &mut S
) -> Result<(), Error>
[src]

Handle a RegisterSource request.

pub fn advance_domain(
    &mut self,
    name: Option<String>,
    next: T
) -> Result<(), Error>
[src]

Handle an AdvanceDomain request.

pub fn uninterest(&mut self, client: Token, name: &str) -> Result<(), Error>[src]

Handles an Uninterest request, possibly cleaning up dataflows that are no longer interesting to any client.

pub fn disconnect_client(&mut self, client: Token) -> Result<(), Error>[src]

Cleans up all bookkeeping state for the specified client.

pub fn is_any_outdated(&self) -> bool[src]

Returns true iff the probe is behind any input handle. Mostly used as a convenience method during testing. Using this within step_while is not safe in general and might lead to stalls.

pub fn test_single<S: Scope<Timestamp = T>>(
    &mut self,
    scope: &mut S,
    rule: Rule
) -> Collection<S, Vec<Value>, isize>
[src]

Helper for registering, publishing, and indicating interest in a single, named query. Used for testing.

impl<Token> Server<Duration, Token> where
    Token: Hash + Eq + Copy
[src]

pub fn enable_logging<A: Allocate>(
    &self,
    worker: &mut Worker<A>
) -> Result<(), Error>
[src]

Registers loggers for use in the various logging sources.

pub fn shutdown_logging<A: Allocate>(
    &self,
    worker: &mut Worker<A>
) -> Result<(), Error>
[src]

Unregisters loggers.

Auto Trait Implementations

impl<T, Token> Unpin for Server<T, Token> where
    T: Unpin,
    Token: Unpin

impl<T, Token> !Sync for Server<T, Token>

impl<T, Token> !Send for Server<T, Token>

impl<T, Token> !RefUnwindSafe for Server<T, Token>

impl<T, Token> !UnwindSafe for Server<T, Token>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]