Package oracle.pgx.api.mllib
Class ModelRepository
- java.lang.Object
-
- oracle.pgx.api.mllib.ModelRepository
-
- Direct Known Subclasses:
DbModelRepository
public abstract class ModelRepository extends java.lang.Object
Base class for the different model repositories (At the moment only DB is supported.). It can be used to - list all available model stores in the model repository, - create new and delete existing model stores, - list all models in a given model store, - get the model description for a model that is stored in the given model store, - delete a model from a given model store.- Since:
- 22.2
-
-
Constructor Summary
Constructors Constructor Description ModelRepository(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
create(java.lang.String modelStoreName)
Create a model store with the provided name.abstract PgxFuture<java.lang.Void>
createAsync(java.lang.String modelStoreName)
Non-blocking version of the create method.void
deleteModel(java.lang.String modelStoreName, java.lang.String modelName)
Delete the model in the specified model store, with the given model name.abstract PgxFuture<java.lang.Void>
deleteModelAsync(java.lang.String modelStoreName, java.lang.String modelName)
Non-blocking version of the deleteModel method.void
deleteModelStore(java.lang.String modelStoreName)
Delete a model store by name.abstract PgxFuture<java.lang.Void>
deleteModelStoreAsync(java.lang.String modelStoreName)
Non-blocking version of the deleteModelStore method.java.lang.String
getModelDescription(java.lang.String modelStoreName, java.lang.String modelName)
Retrieve the description of the model in the specified model store, with the given model name.abstract PgxFuture<java.lang.String>
getModelDescriptionAsync(java.lang.String modelStoreName, java.lang.String modelName)
Non-blocking version of the getModelDescription method.java.util.List<java.lang.String>
listModels(java.lang.String modelStoreName)
Lists the models present in the model store with the given name.abstract PgxFuture<java.util.List<java.lang.String>>
listModelsAsync(java.lang.String modelStoreName)
Non-blocking version of the listModels method.java.util.List<java.lang.String>
listModelStoresNames()
List all model store names.abstract PgxFuture<java.util.List<java.lang.String>>
listModelStoresNamesAsync()
Non-blocking version of the listModelStoresNames method.java.util.List<java.lang.String>
listModelStoresNamesMatching(java.lang.String regex)
List all model store names that match the provided regex.
-
-
-
Constructor Detail
-
ModelRepository
public ModelRepository(PgxSession session, oracle.pgx.api.internal.Core core, java.util.function.Supplier<java.lang.String> keystorePathSupplier, java.util.function.Supplier<char[]> keystorePasswordSupplier)
-
-
Method Detail
-
deleteModelStore
public void deleteModelStore(java.lang.String modelStoreName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Delete a model store by name.- Parameters:
modelStoreName
- the name of the model store- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
create
public void create(java.lang.String modelStoreName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Create a model store with the provided name.- Parameters:
modelStoreName
- the name of the model store- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
listModelStoresNames
public java.util.List<java.lang.String> listModelStoresNames() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
List all model store names.- Returns:
- a list of all the model store names.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
listModelStoresNamesMatching
public java.util.List<java.lang.String> listModelStoresNamesMatching(java.lang.String regex) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
List all model store names that match the provided regex. (eq. to applying regex on result of listModelStoresNames method)- Parameters:
regex
- the regex that is used to filter the model store names.- Returns:
- a list of all matching model store names.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
listModels
public java.util.List<java.lang.String> listModels(java.lang.String modelStoreName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Lists the models present in the model store with the given name.- Parameters:
modelStoreName
- the name of the model store- Returns:
- a list of all model names in the model store.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
getModelDescription
public java.lang.String getModelDescription(java.lang.String modelStoreName, java.lang.String modelName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Retrieve the description of the model in the specified model store, with the given model name.- Parameters:
modelStoreName
- the name of the model storemodelName
- the name under which the model was stored- Returns:
- the description that was stored with the model.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
deleteModel
public void deleteModel(java.lang.String modelStoreName, java.lang.String modelName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Delete the model in the specified model store, with the given model name.- Parameters:
modelStoreName
- the name of the model storemodelName
- the name under which the model was stored- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 22.2
-
deleteModelStoreAsync
public abstract PgxFuture<java.lang.Void> deleteModelStoreAsync(java.lang.String modelStoreName)
Non-blocking version of the deleteModelStore method.- Since:
- 22.2
- See Also:
deleteModelStore(String)
-
createAsync
public abstract PgxFuture<java.lang.Void> createAsync(java.lang.String modelStoreName)
Non-blocking version of the create method.- Since:
- 22.2
- See Also:
create(String)
-
listModelStoresNamesAsync
public abstract PgxFuture<java.util.List<java.lang.String>> listModelStoresNamesAsync()
Non-blocking version of the listModelStoresNames method.- Since:
- 22.2
- See Also:
listModelStoresNames()
-
listModelsAsync
public abstract PgxFuture<java.util.List<java.lang.String>> listModelsAsync(java.lang.String modelStoreName)
Non-blocking version of the listModels method.- Since:
- 22.2
- See Also:
listModels(String)
-
getModelDescriptionAsync
public abstract PgxFuture<java.lang.String> getModelDescriptionAsync(java.lang.String modelStoreName, java.lang.String modelName)
Non-blocking version of the getModelDescription method.- Since:
- 22.2
- See Also:
getModelDescription(String, String)
-
deleteModelAsync
public abstract PgxFuture<java.lang.Void> deleteModelAsync(java.lang.String modelStoreName, java.lang.String modelName)
Non-blocking version of the deleteModel method.- Since:
- 22.2
- See Also:
deleteModel(String, String)
-
-