org.elder.sourcerer.Snapshot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sourcerer-core Show documentation
Show all versions of sourcerer-core Show documentation
An opinionated framework for implementing an CQRS architecture using event sourcing
The newest version!
package org.elder.sourcerer;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The current state of an aggregate at some point in time.
*/
public class Snapshot {
private final TState state;
private final Integer streamVersion;
@JsonCreator
public Snapshot(
@JsonProperty("state") final TState state,
@JsonProperty("streamVersion") final Integer streamVersion) {
this.state = state;
this.streamVersion = streamVersion;
}
public TState getState() {
return state;
}
public Integer getStreamVersion() {
return streamVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy