Class TenantStateManager

java.lang.Object
org.bonitasoft.engine.tenant.TenantStateManager

@Component public class TenantStateManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    TenantStateManager(UserTransactionService transactionService, PlatformService platformService, NodeConfiguration nodeConfiguration, SessionService sessionService, long tenantId, SchedulerService schedulerService, BroadcastService broadcastService, TenantServicesManager tenantServicesManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 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> T
    executeTenantManagementOperation(String operationName, Callable<T> operation)
     
    protected ServiceAccessor
     
     
    long
     
    void
    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 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 the tenant: - start services - resume elements if its the only node **Called outside of a transaction in a platform-level session**
    void
    Stop the tenant: - stop services - delete session if its the only node **Called outside of a transaction in a platform-level session**

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getTenantId

      public long getTenantId()
    • stop

      public void stop() throws Exception
      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

      public void start() throws Exception
      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.BonitaHomeNotSetException
      IOException
      org.bonitasoft.engine.exception.BonitaHomeConfigurationException
      ReflectiveOperationException
    • pause

      public void pause() throws Exception
      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

      public void resume() throws Exception
      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

      public void activate() throws Exception
      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

      public void deactivate() throws Exception
      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

      public String getStatus() throws Exception
      Throws:
      Exception