All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rahulsom.grooves.api.snapshots.internal.BaseSnapshot Maven / Gradle / Ivy

package com.github.rahulsom.grooves.api.snapshots.internal;

import com.github.rahulsom.grooves.api.AggregateType;
import com.github.rahulsom.grooves.api.events.BaseEvent;
import rx.Observable;

import java.util.Set;

/**
 * Marks a class as a snapshot. This makes no assumption about the type of snapshot.
 *
 * @param   The Aggregate this snapshot works over
 * @param  The type for the snapshot's {@link #getId()} field
 * @param     The type for the {@link EventT}'s id field
 * @param       The base type for events that apply to {@link AggregateT}
 *
 * @author Rahul Somasunderam
 */
public interface BaseSnapshot<
        AggregateT extends AggregateType,
        SnapshotIdT,
        EventIdT,
        EventT extends BaseEvent> {
    SnapshotIdT getId();

    void setId(SnapshotIdT id);

    Observable getAggregateObservable();

    void setAggregate(AggregateT aggregate);

    Observable getDeprecatedByObservable();

    void setDeprecatedBy(AggregateT aggregate);

    Observable getDeprecatesObservable();

    void setLastEvent(EventT event);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy