Package org.bonitasoft.engine.tenant
Class TenantStateManager
java.lang.Object
org.bonitasoft.engine.tenant.TenantStateManager
-
Constructor Summary
ConstructorsConstructorDescriptionTenantStateManager(UserTransactionService transactionService, PlatformService platformService, NodeConfiguration nodeConfiguration, SessionService sessionService, long tenantId, SchedulerService schedulerService, BroadcastService broadcastService, TenantServicesManager tenantServicesManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activate the tenant: - resume elements - start services - tenant has the status ACTIVATED in database - services are started on other nodes **Called outside a transaction in a platform-level session**voidDeactivate the tenant: - stop services - tenant has the status DEACTIVATED in database - services are stopped on other nodes **Called outside a transaction with a platform-level session**<T> TexecuteTenantManagementOperation(String operationName, Callable<T> operation) protected ServiceAccessorlongvoidpause()Pause the tenant: - pause services - tenant has the status PAUSED in database - other nodes pause the services **Called outside a transaction with a tenant-level session**voidresume()Resume the tenant: - resume services - tenant has the status ACTIVATED in database - other nodes resume the services **Called outside a transaction with a tenant-level session**voidstart()Start the tenant: - start services - resume elements if its the only node **Called outside of a transaction in a platform-level session**voidstop()Stop the tenant: - stop services - delete session if its the only node **Called outside of a transaction in a platform-level session**
-
Constructor Details
-
TenantStateManager
public TenantStateManager(UserTransactionService transactionService, PlatformService platformService, NodeConfiguration nodeConfiguration, SessionService sessionService, @Value("${tenantId}") long tenantId, SchedulerService schedulerService, BroadcastService broadcastService, TenantServicesManager tenantServicesManager)
-
-
Method Details
-
getTenantId
public long getTenantId() -
stop
Stop the tenant: - stop services - delete session if its the only node **Called outside of a transaction in a platform-level session**- Throws:
Exception
-
start
Start the tenant: - start services - resume elements if its the only node **Called outside of a transaction in a platform-level session**- Throws:
Exception
-
getServiceAccessor
protected ServiceAccessor getServiceAccessor() throws org.bonitasoft.engine.exception.BonitaHomeNotSetException, IOException, org.bonitasoft.engine.exception.BonitaHomeConfigurationException, ReflectiveOperationException- Throws:
org.bonitasoft.engine.exception.BonitaHomeNotSetExceptionIOExceptionorg.bonitasoft.engine.exception.BonitaHomeConfigurationExceptionReflectiveOperationException
-
pause
Pause the tenant: - pause services - tenant has the status PAUSED in database - other nodes pause the services **Called outside a transaction with a tenant-level session**- Throws:
Exception
-
resume
Resume the tenant: - resume services - tenant has the status ACTIVATED in database - other nodes resume the services **Called outside a transaction with a tenant-level session**- Throws:
Exception
-
activate
Activate the tenant: - resume elements - start services - tenant has the status ACTIVATED in database - services are started on other nodes **Called outside a transaction in a platform-level session**- Throws:
Exception
-
deactivate
Deactivate the tenant: - stop services - tenant has the status DEACTIVATED in database - services are stopped on other nodes **Called outside a transaction with a platform-level session**- Throws:
Exception
-
executeTenantManagementOperation
public <T> T executeTenantManagementOperation(String operationName, Callable<T> operation) throws Exception - Throws:
Exception
-
getStatus
- Throws:
Exception
-