Package org.projectnessie.api
Interface NamespaceApi
-
- All Known Subinterfaces:
HttpNamespaceApi
public interface NamespaceApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NamespacecreateNamespace(@NotNull NamespaceParams params)Creates a new namespace.voiddeleteNamespace(@NotNull NamespaceParams params)Deletes the namespace if it doesn't contain any tables.NamespacegetNamespace(@NotNull NamespaceParams params)Retrieves theNamespaceinstance if it exists.GetNamespacesResponsegetNamespaces(@NotNull MultipleNamespacesParams params)Retrieves a list ofNamespaceinstances that match a given namespace prefix.
-
-
-
Method Detail
-
createNamespace
Namespace createNamespace(@NotNull @NotNull NamespaceParams params) throws NessieNamespaceAlreadyExistsException, NessieReferenceNotFoundException
Creates a new namespace.- Parameters:
params- TheNamespaceParamsthat includes the parameters for the API call.- Returns:
- A
Namespaceinstance if creating the namespace succeeded. - Throws:
NessieReferenceNotFoundException- If the reference could not be found.NessieNamespaceAlreadyExistsException- If the namespace already exists.
-
deleteNamespace
void deleteNamespace(@NotNull @NotNull NamespaceParams params) throws NessieReferenceNotFoundException, NessieNamespaceNotEmptyException, NessieNamespaceNotFoundExceptionDeletes the namespace if it doesn't contain any tables.- Parameters:
params- TheNamespaceParamsthat includes the parameters for the API call.- Throws:
NessieReferenceNotFoundException- If the reference could not be found.NessieNamespaceNotEmptyException- If the namespace is not empty and contains tables.NessieNamespaceNotFoundException- If the namespace to be deleted could not be found.
-
getNamespace
Namespace getNamespace(@NotNull @NotNull NamespaceParams params) throws NessieNamespaceNotFoundException, NessieReferenceNotFoundException
Retrieves theNamespaceinstance if it exists.- Parameters:
params- TheNamespaceParamsthat includes the parameters for the API call.- Returns:
- A
Namespaceinstance if a namespace with the given name exists. - Throws:
NessieReferenceNotFoundException- If the reference could not be found.NessieNamespaceNotFoundException- If the namespace does not exist.
-
getNamespaces
GetNamespacesResponse getNamespaces(@NotNull @NotNull MultipleNamespacesParams params) throws NessieReferenceNotFoundException
Retrieves a list ofNamespaceinstances that match a given namespace prefix.- Parameters:
params- TheMultipleNamespacesParamsthat includes the parameters for the API call.- Returns:
- A
GetNamespacesResponseinstance containing all the namespaces that match the given namespace prefix. - Throws:
NessieReferenceNotFoundException- If the reference could not be found.
-
-