Class TenantStateManager


  • @Component
    public class TenantStateManager
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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**
      <T> T executeTenantManagementOperation​(java.lang.String operationName, java.util.concurrent.Callable<T> operation)  
      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()
      Start 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**
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getTenantId

        public long getTenantId()
      • stop

        public void stop()
                  throws java.lang.Exception
        Stop the tenant: - stop services - delete session if its the only node **Called outside of a transaction in a platform-level session**
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws java.lang.Exception
        Start the tenant: - start services - resume elements if its the only node **Called outside of a transaction in a platform-level session**
        Throws:
        java.lang.Exception
      • getPlatformAccessor

        protected 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
        Throws:
        org.bonitasoft.engine.exception.BonitaHomeNotSetException
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaHomeConfigurationException
      • pause

        public void pause()
                   throws java.lang.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:
        java.lang.Exception
      • resume

        public void resume()
                    throws java.lang.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:
        java.lang.Exception
      • activate

        public void activate()
                      throws java.lang.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:
        java.lang.Exception
      • deactivate

        public void deactivate()
                        throws java.lang.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:
        java.lang.Exception
      • executeTenantManagementOperation

        public <T> T executeTenantManagementOperation​(java.lang.String operationName,
                                                      java.util.concurrent.Callable<T> operation)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception