public class MLEnvironmentFactory extends Object
The following code snippet shows how to interact with MLEnvironmentFactory.
long mlEnvId = MLEnvironmentFactory.getNewMLEnvironmentId();
MLEnvironment mlEnv = MLEnvironmentFactory.get(mlEnvId);
Modifier and Type | Field and Description |
---|---|
static Long |
DEFAULT_ML_ENVIRONMENT_ID
The default MLEnvironmentId.
|
Constructor and Description |
---|
MLEnvironmentFactory() |
Modifier and Type | Method and Description |
---|---|
static MLEnvironment |
get(Long mlEnvId)
Get the MLEnvironment using a MLEnvironmentId.
|
static MLEnvironment |
getDefault()
Get the MLEnvironment use the default MLEnvironmentId.
|
static Long |
getNewMLEnvironmentId()
Create a unique MLEnvironment id and register a new MLEnvironment in the factory.
|
static Long |
registerMLEnvironment(MLEnvironment env)
Register a new MLEnvironment to the factory and return a new MLEnvironment id.
|
static MLEnvironment |
remove(Long mlEnvId)
Remove the MLEnvironment using the MLEnvironmentId.
|
public static final Long DEFAULT_ML_ENVIRONMENT_ID
public static MLEnvironment get(Long mlEnvId)
mlEnvId
- the MLEnvironmentIdpublic static MLEnvironment getDefault()
public static Long getNewMLEnvironmentId()
public static Long registerMLEnvironment(MLEnvironment env)
env
- the MLEnvironment that will be stored in the factory.public static MLEnvironment remove(Long mlEnvId)
mlEnvId
- the id.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.