
com.github.rahulsom.grooves.queries.QuerySupport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grooves-api Show documentation
Show all versions of grooves-api Show documentation
APIs that help in computation of Grooves based Snapshots
The newest version!
package com.github.rahulsom.grooves.queries;
import com.github.rahulsom.grooves.api.events.BaseEvent;
import com.github.rahulsom.grooves.api.snapshots.Snapshot;
import com.github.rahulsom.grooves.queries.internal.QueryExecutor;
import org.jetbrains.annotations.NotNull;
import org.reactivestreams.Publisher;
/**
* Aggregate trait that simplifies computing temporal snapshots from events.
*
* @param The aggregate over which the query executes
* @param The type of the Event's id field
* @param The type of the Event
* @param The type of the Snapshot's id field
* @param The type of the Snapshot
*
* @author Rahul Somasunderam
*/
public interface QuerySupport<
AggregateT,
EventIdT,
EventT extends BaseEvent,
SnapshotIdT,
SnapshotT extends Snapshot
>
extends
TemporalQuerySupport,
VersionedQuerySupport {
@NotNull
@Override
default QueryExecutor getExecutor() {
return new QueryExecutor<>();
}
@NotNull
@Override
default Publisher findEventsBefore(@NotNull EventT event) {
return VersionedQuerySupport.super.findEventsBefore(event);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy