Package org.projectnessie.client
Class StreamingUtil
- java.lang.Object
-
- org.projectnessie.client.StreamingUtil
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stream<CommitMeta>getCommitLogStream(@NotNull TreeApi treeApi, @NotNull String ref, OptionalInt pageSizeHint)Default implementation to return a stream of commit-log entries, functionally equivalent to callingTreeApi.getCommitLog(String, Integer, String)with manual paging.static Stream<EntriesResponse.Entry>getEntriesStream(@NotNull TreeApi treeApi, @NotNull String ref, OptionalInt pageSizeHint, List<String> types)Default implementation to return a stream of objects for a ref, functionally equivalent to callingTreeApi.getEntries(String, Integer, String, List)with manual paging.
-
-
-
Method Detail
-
getEntriesStream
public static Stream<EntriesResponse.Entry> getEntriesStream(@NotNull @NotNull TreeApi treeApi, @NotNull @NotNull String ref, OptionalInt pageSizeHint, List<String> types) throws NessieNotFoundException
Default implementation to return a stream of objects for a ref, functionally equivalent to callingTreeApi.getEntries(String, Integer, String, List)with manual paging.The
Streamreturned bygetEntriesStream(ref, OptionalInt.empty()), if not limited, returns all commit-log entries.- Parameters:
ref- a named reference (branch or tag name) or a commit-hashpageSizeHint- page-size hint for the backendtypes- types to filter on. Empty list means no filtering.- Returns:
- stream of
EntriesResponse.Entryobjects - Throws:
NessieNotFoundException
-
getCommitLogStream
public static Stream<CommitMeta> getCommitLogStream(@NotNull @NotNull TreeApi treeApi, @NotNull @NotNull String ref, OptionalInt pageSizeHint) throws NessieNotFoundException
Default implementation to return a stream of commit-log entries, functionally equivalent to callingTreeApi.getCommitLog(String, Integer, String)with manual paging.The
Streamreturned bygetCommitLogStream(ref, OptionalInt.empty()), if not limited, returns all commit-log entries.- Parameters:
ref- a named reference (branch or tag name) or a commit-hashpageSizeHint- page-size hint for the backend- Returns:
- stream of
CommitMetaobjects - Throws:
NessieNotFoundException
-
-