@Component
public class TenantStateManager
extends java.lang.Object
| Constructor and Description |
|---|
TenantStateManager(UserTransactionService transactionService,
PlatformService platformService,
NodeConfiguration nodeConfiguration,
SessionService sessionService,
long tenantId,
SchedulerService schedulerService,
BroadcastService broadcastService,
TenantServicesManager tenantServicesManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
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**
|
void |
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**
|
protected PlatformServiceAccessor |
getPlatformAccessor() |
long |
getTenantId() |
void |
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**
|
void |
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**
|
void |
start()
Stop the tenant:
- start services
- resume elements if its the only node
**Called outside of a transaction in a platform-level session**
|
void |
stop()
Stop the tenant:
- stop services
- delete session if its the only node
**Called outside of a transaction in a platform-level session**
|
public TenantStateManager(UserTransactionService transactionService, PlatformService platformService, NodeConfiguration nodeConfiguration, SessionService sessionService, @Value(value="${tenantId}") long tenantId, SchedulerService schedulerService, BroadcastService broadcastService, TenantServicesManager tenantServicesManager)
public long getTenantId()
public void stop()
throws java.lang.Exception
java.lang.Exceptionpublic void start()
throws java.lang.Exception
java.lang.Exceptionprotected PlatformServiceAccessor getPlatformAccessor() throws org.bonitasoft.engine.exception.BonitaHomeNotSetException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.io.IOException, org.bonitasoft.engine.exception.BonitaHomeConfigurationException
org.bonitasoft.engine.exception.BonitaHomeNotSetExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionorg.bonitasoft.engine.exception.BonitaHomeConfigurationExceptionpublic void pause()
throws java.lang.Exception
java.lang.Exceptionpublic void resume()
throws java.lang.Exception
java.lang.Exceptionpublic void activate()
throws java.lang.Exception
java.lang.Exceptionpublic void deactivate()
throws java.lang.Exception
java.lang.Exception