
io.serialized.client.aggregate.EventBatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serialized-client Show documentation
Show all versions of serialized-client Show documentation
Java Client for Serialized APIs
package io.serialized.client.aggregate;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
public class EventBatch {
private Long expectedVersion;
private List> events;
public EventBatch() {
}
public EventBatch(List> events, Long expectedVersion) {
this.events = events;
this.expectedVersion = expectedVersion;
}
public Long expectedVersion() {
return expectedVersion;
}
public List> events() {
return Optional.ofNullable(events).map(Collections::unmodifiableList).orElseGet(Collections::emptyList);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy