Package org.projectnessie.api
Interface ContentsApi
-
- All Known Subinterfaces:
HttpContentsApi
public interface ContentsApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentsgetContents(@Valid ContentsKey key, @Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @Valid @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hashOnRef)MultiGetContentsResponsegetMultipleContents(@Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @Valid @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hashOnRef, @Valid @NotNull MultiGetContentsRequest request)Similar togetContents(ContentsKey, String, String), but takes multipleContentsKeys and returns theContentsfor the one or moreContentsKeys in a named-reference (aBranchorTag).
-
-
-
Method Detail
-
getContents
Contents getContents(@Valid @Valid ContentsKey key, @Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @Valid @Nullable @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @Valid @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hashOnRef) throws NessieNotFoundException
This operation returns theContentsfor aContentsKeyin a named-reference (aBranchorTag).If the table-metadata is tracked globally (Iceberg), Nessie returns a
Contentsobject, that contains the most up-to-date part for the globally tracked part (Iceberg: table-metadata) plus the per-Nessie-reference/hash specific part (Iceberg: snapshot-ID).- Parameters:
key- theContentsKeys to retrieveref- named-reference to retrieve the contents forhashOnRef- hash onrefto retrieve the contents for, translates toHEAD, if missing/null- Returns:
- list of
MultiGetContentsResponse.ContentsWithKeys - Throws:
NessieNotFoundException- ifreforhashOnRefdoes not exist
-
getMultipleContents
MultiGetContentsResponse getMultipleContents(@Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @Valid @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @Valid @Nullable @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @Valid @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hashOnRef, @Valid @NotNull @Valid @NotNull MultiGetContentsRequest request) throws NessieNotFoundException
Similar togetContents(ContentsKey, String, String), but takes multipleContentsKeys and returns theContentsfor the one or moreContentsKeys in a named-reference (aBranchorTag).If the table-metadata is tracked globally (Iceberg), Nessie returns a
Contentsobject, that contains the most up-to-date part for the globally tracked part (Iceberg: table-metadata) plus the per-Nessie-reference/hash specific part (Iceberg: snapshot-ID).- Parameters:
ref- named-reference to retrieve the contents forhashOnRef- hash onrefto retrieve the contents for, translates toHEAD, if missing/nullrequest- theContentsKeys to retrieve- Returns:
- list of
MultiGetContentsResponse.ContentsWithKeys - Throws:
NessieNotFoundException- ifreforhashOnRefdoes not exist
-
-