Class DefaultSynchronyProcessManager

java.lang.Object
com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager
All Implemented Interfaces:
SynchronyProcessManager, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

@Component("synchronyProcessManager") public class DefaultSynchronyProcessManager extends Object implements SynchronyProcessManager, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Since:
6.0
  • Constructor Details

  • Method Details

    • getConfiguration

      public Map<String,String> getConfiguration()
      Description copied from interface: SynchronyProcessManager
      Returns a map containing various configuration information.
      Specified by:
      getConfiguration in interface SynchronyProcessManager
    • getSynchronyProperty

      public String getSynchronyProperty(SynchronyEnv env)
      Description copied from interface: SynchronyProcessManager
      Returns the configured environment value for the provided key.
      Specified by:
      getSynchronyProperty in interface SynchronyProcessManager
      Parameters:
      env - the key that will be looked up
      Returns:
      the configured environment property
    • isSynchronyStartingUp

      public boolean isSynchronyStartingUp()
      Description copied from interface: SynchronyProcessManager
      Determines if the Synchrony that Confluence uses to connect to is in the process of starting up.
      Specified by:
      isSynchronyStartingUp in interface SynchronyProcessManager
      Returns:
      true iff Synchrony is starting up and has not encountered an error.
    • isSynchronyClusterManuallyManaged

      public boolean isSynchronyClusterManuallyManaged()
      Description copied from interface: SynchronyProcessManager
      Returns true if external Synchrony cluster is used, and false if Confluence manages Synchrony cluster on its own. External Synchrony cluster can run only for Confluence DC, when synchrony.service.url environmental variable is set.
      Specified by:
      isSynchronyClusterManuallyManaged in interface SynchronyProcessManager
      Returns:
      true if external Synchrony cluster is used, and false if Confluence manage Synchrony cluster on its own.
    • isSynchronyOff

      public boolean isSynchronyOff()
      Description copied from interface: SynchronyProcessManager
      Returns true if synchrony is switched off (for example, by admin), and false otherwise. This method only checks on/off settings, and ignores state returned by SynchronyProcessManager.isSynchronyClusterManuallyManaged()
      Specified by:
      isSynchronyOff in interface SynchronyProcessManager
      Returns:
      true if synchrony is switched off, and false otherwise.
    • setSynchronyOff

      public void setSynchronyOff(boolean off)
      Description copied from interface: SynchronyProcessManager
      Sets flag to the database, which indicates if synchrony should run as external process, and represents results of the admin actions.
      Specified by:
      setSynchronyOff in interface SynchronyProcessManager
      Parameters:
      off - true if Synchrony should be disabled, and false if Synchrony should be enabled.
    • startup

      public io.atlassian.util.concurrent.Promise<Boolean> startup()
      Description copied from interface: SynchronyProcessManager
      Starts the Synchrony process and returns a Promise<Boolean> which indicates a if startup was successful or not. If the promise resolves to true, the Synchrony process should be ready to serve requests.
      Specified by:
      startup in interface SynchronyProcessManager
      Returns:
      a promise which resolves to a boolean indicating if startup was successful or not.
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • stop

      public boolean stop()
      Description copied from interface: SynchronyProcessManager
      Terminates the Synchrony process.
      Specified by:
      stop in interface SynchronyProcessManager
    • restart

      public io.atlassian.util.concurrent.Promise<Boolean> restart()
      Description copied from interface: SynchronyProcessManager
      Shuts down and then starts up the Synchrony process. This is effectively the same as calling SynchronyProcessManager.stop() and then SynchronyProcessManager.startup(). However, this method waits for ExternalProcess.isAlive() to return false in between stopping and starting.
      Specified by:
      restart in interface SynchronyProcessManager
      Returns:
      a promise which resolves to a boolean indicating if restart was successful or not.
    • onCollabEditingModeChangedEvent

      @EventListener public void onCollabEditingModeChangedEvent(ClusterEventWrapper eventWrapper)