Package org.projectnessie.api.v1
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, @NotNull Namespace namespace)Creates a new namespace with Namespace properties.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.voidupdateProperties(@NotNull NamespaceParams params, @NotNull NamespaceUpdate namespaceUpdate)Updates/removes properties for a givenNamespace.
-
-
-
Method Detail
-
createNamespace
Namespace createNamespace(@NotNull @NotNull NamespaceParams params, @NotNull @NotNull Namespace namespace) throws NessieNamespaceAlreadyExistsException, NessieReferenceNotFoundException
Creates a new namespace with Namespace properties.- Parameters:
params- TheNamespaceParamsthat includes the parameters for the API call.namespace- The instance including the namespace properties.- 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.
-
updateProperties
void updateProperties(@NotNull @NotNull NamespaceParams params, @NotNull @NotNull NamespaceUpdate namespaceUpdate) throws NessieNamespaceNotFoundException, NessieReferenceNotFoundExceptionUpdates/removes properties for a givenNamespace.- Parameters:
params- TheNamespaceParamsthat includes the parameters for the API call.namespaceUpdate- The instance including the property updates/deletes.- Throws:
NessieNamespaceNotFoundException- If the namespace does not exist.NessieReferenceNotFoundException- If the reference could not be found.
-
-