com.github.rahulsom.grooves.queries.internal.SimpleExecutor Maven / Gradle / Ivy
package com.github.rahulsom.grooves.queries.internal;
import com.github.rahulsom.grooves.api.AggregateType;
import com.github.rahulsom.grooves.api.EventApplyOutcome;
import com.github.rahulsom.grooves.api.events.BaseEvent;
import com.github.rahulsom.grooves.api.snapshots.internal.BaseSnapshot;
import io.reactivex.Flowable;
import static io.reactivex.Flowable.fromPublisher;
public class SimpleExecutor<
AggregateIdT,
AggregateT extends AggregateType,
EventIdT,
EventT extends BaseEvent,
ApplicableEventT extends EventT,
SnapshotIdT,
SnapshotT extends
BaseSnapshot,
QueryT extends
SimpleQuery
> extends
QueryExecutor {
@Override
protected Flowable callMethod(
QueryT query, String methodName, SnapshotT snapshot, EventT event) {
return fromPublisher(query.applyEvent((ApplicableEventT) event, snapshot));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy