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

io.serialized.client.aggregate.EventBatch Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
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