io.serialized.client.feed.FeedResponse 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.feed;
import java.util.List;
import java.util.stream.Collectors;
import static java.util.Collections.unmodifiableList;
public class FeedResponse {
private List entries;
private boolean hasMore;
private long currentSequenceNumber;
/**
* @return List of all events from all batches.
*/
public List events() {
return unmodifiableList(entries.stream().flatMap(e -> e.events().stream()).collect(Collectors.toList()));
}
/**
* @return The entries.
*/
public List entries() {
return unmodifiableList(entries);
}
/**
* @return True if there are more events available in the feed.
*/
public boolean hasMore() {
return hasMore;
}
/**
* @return Current sequence number at feed head.
*/
public long currentSequenceNumber() {
return currentSequenceNumber;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy