Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Operators

Riccardo Tommasini edited this page Aug 24, 2018 · 7 revisions

Stream To Relation - cfr windowing and csparql windowing

  • WindowOperator
  • WindowAssigner

Relation To Relation - cfr querying

Execution - cfr sds

public interface ContinuousQueryExecution extends Observer {

    InstantaneousResult eval(long ts);

    ContinuousQuery getContinuousQuery();

    String getQueryID();

    SDS getSDS();

    void add(QueryResultFormatter o);

    void remove(QueryResultFormatter o);


}

Relation To Stream

Enumeration it.polimi.yasper.core.spe.operators.r2s.StreamOperator

  • DSTREAM
  • ISTREAM
  • RSTREAM
public class Dstream implements RelationToStreamOperator {
    private final int i;
    private InstantaneousResult last_response;

    public Dstream(int i) {
        this.i = i;
    }

    public static RelationToStreamOperator get() {
        return new Dstream(1);
    }

    @Override
    public InstantaneousResult eval(InstantaneousResult new_response) {
        InstantaneousResult diff = last_response.difference(new_response);
        last_response = new_response;
        return diff;
    }
}

Results

public abstract class InstantaneousResult implements Result {

    private String id;
    private long creation_timestamp, cep_timestamp;
    private ContinuousQuery query;

    @Override
    public long getCreationTime() {
        return creation_timestamp;
    }

    @Override
    public String getQueryString() {
        return query.toString();
    }

    public abstract InstantaneousResult difference(InstantaneousResult r);

    public abstract InstantaneousResult intersection(InstantaneousResult new_response);
}