Interface InstanceLifecycleManager
- All Known Implementing Classes:
InstanceLifecycleManagerImpl,InstanceLifecycleManagerSqlDb,InstanceLifecycleManagerSqLite
public interface InstanceLifecycleManager
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumState of an HDI container. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckThatTenantExists(String tenantId) Checks if a schema has been created for a tenantcreateAndGetLibContainers(DataSourceInfo dataSourceInfo) Creates on the database used by the given datasource a hdi container/schema reserved of the library itself.voidcreateNewInstance(String tenantId, ProvisioningParameters instanceParameters, BindingParameters bindingParameters) default ProvisioningParameterscreateProvisioningParameters(String databaseId) Create InstanceCreateOptions that contain the specified database idvoiddeleteInstance(String tenantId) getAllTenantInfos(boolean forceCacheUpdate) Returns all tenants that have a DB container/schema.getAllTenants(boolean forceCacheUpdate) Returns all tenants that have a DB container/schemagetContainerStatus(String tenantId) getDataSourceInfo(String tenantId, boolean forceCacheUpdate) default DbIdentifiers.DBdefault StringgetMtLibContainerName(String databaseId) The mt-lib creates a container/schema in each provided database for itself.booleanhasCredentials(String tenantId, boolean forceCacheUpdate) Checks if the tenant has credentials for the schema.booleanvoidinsertDbIdentifiers(DbIdentifiers dbIdentifiers)
-
Field Details
-
DATABASE_ID
- See Also:
-
-
Method Details
-
createNewInstance
void createNewInstance(String tenantId, ProvisioningParameters instanceParameters, BindingParameters bindingParameters) throws InternalError - Throws:
InternalError
-
deleteInstance
- Throws:
InternalError
-
getDataSourceInfo
DataSourceInfo getDataSourceInfo(String tenantId, boolean forceCacheUpdate) throws InternalError, UnknownTenant - Throws:
InternalErrorUnknownTenant
-
getContainerStatus
- Throws:
InternalError
-
hasCredentials
Checks if the tenant has credentials for the schema.- Parameters:
tenantId- identifier of tenant that is checkedforceCacheUpdate- If set, the current tenant is re-determined.- Returns:
- true if credentials are available
- Throws:
InternalError- is thrown if a problem occurs, if for example service manager cannot be accessed
-
getAllTenantInfos
Returns all tenants that have a DB container/schema. In contrast togetAllTenants(boolean)this method provides additional tenant properties like database_id if available.- Parameters:
forceCacheUpdate- If set, the current list of tenants is re-determined.- Returns:
- A map with all
TenantMetadata. Tenant id is used as key. - Throws:
InternalError
-
getAllTenants
Returns all tenants that have a DB container/schema- Parameters:
forceCacheUpdate- If set, the current list of tenants is re-determined.- Returns:
- A set with all tenant ids
- Throws:
InternalError
-
checkThatTenantExists
Checks if a schema has been created for a tenant- Parameters:
tenantId- identifier of tenant that is checked- Throws:
UnknownTenant- is thrown if tenant doesn't existInternalError- is thrown if a problem occurs, if for example service manager or DB cannot be accessed
-
createAndGetLibContainers
Creates on the database used by the given datasource a hdi container/schema reserved of the library itself. If the parameter is null or the database cannot be determined, the missing containers are created on all databases. When used with Hana a service instance is created for tenant MT_LIB_TENANT-"database id" No error is thrown if container creation failed !- Parameters:
dataSourceInfo- Credentials of dataSource for which lib container is created- Returns:
- Info for lib container
- Throws:
InternalError- is thrown when a communication problems arises
-
getLibContainers
- Returns:
- the credentials of mt-libs's own containers/schemas. In case of HANA, the list is based on the current state of the instance manager client libs cache.
- Throws:
InternalError- is thrown when a communication problems arises
-
getMtLibContainerName
The mt-lib creates a container/schema in each provided database for itself. This function returns the fake tenantId which is used for it.- Parameters:
databaseId-- Returns:
- tenantId for mt-lib schema/container
-
createProvisioningParameters
Create InstanceCreateOptions that contain the specified database id- Parameters:
databaseId-- Returns:
- new instance create options with set database id
-
hasDbIdentifiers
boolean hasDbIdentifiers() -
insertDbIdentifiers
-
getDbType
-