@Component(value="synchronyProcessManager") public class DefaultSynchronyProcessManager extends Object implements SynchronyProcessManager, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
SynchronyProcessManager.ExternalProcessState| Constructor and Description |
|---|
DefaultSynchronyProcessManager(BootstrapManager bootstrapManager,
SystemInformationService systemInformationService,
ExternalProcessBuilderFactory externalProcessBuilderFactory,
NonIdlingExternalProcessFactory nonIdlingExternalProcessFactory,
com.atlassian.confluence.plugins.synchrony.config.SynchronyConfigurationManager synchronyConfigurationManager,
SynchronyMonitor synchronyMonitor,
com.atlassian.confluence.plugins.synchrony.bootstrap.SynchronyExecutorServiceProvider executorServiceProvider,
ClusterManager clusterManager,
SynchronyProxyMonitor synchronyProxyMonitor,
com.atlassian.event.api.EventPublisher eventPublisher,
DownloadResourceManager downloadResourceManager,
TomcatConfigHelper tomcatConfigHelper,
HttpClientProvider httpClientProvider,
com.atlassian.bandana.BandanaManager bandanaManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
Map<String,String> |
getConfiguration()
Returns a map containing various configuration information.
|
String |
getSynchronyProperty(SynchronyEnv env)
Returns the configured environment value for the provided key.
|
boolean |
isSynchronyClusterManuallyManaged()
Returns
true if external Synchrony cluster is used, and false if Confluence manages
Synchrony cluster on its own. |
boolean |
isSynchronyOff()
Returns
true if synchrony is switched off (for example, by admin), and false
otherwise. |
boolean |
isSynchronyStartingUp()
Determines if the Synchrony that Confluence uses to connect to is in the process of starting up.
|
void |
onCollabEditingModeChangedEvent(ClusterEventWrapper eventWrapper) |
io.atlassian.util.concurrent.Promise<Boolean> |
restart()
Shuts down and then starts up the Synchrony process.
|
void |
setSynchronyOff(boolean off)
Sets flag to the database, which indicates if synchrony should run as external process, and represents results
of the admin actions.
|
io.atlassian.util.concurrent.Promise<Boolean> |
startup()
Starts the Synchrony process and returns a Promise
|
boolean |
stop()
Terminates the Synchrony process.
|
@Autowired public DefaultSynchronyProcessManager(BootstrapManager bootstrapManager, SystemInformationService systemInformationService, ExternalProcessBuilderFactory externalProcessBuilderFactory, NonIdlingExternalProcessFactory nonIdlingExternalProcessFactory, com.atlassian.confluence.plugins.synchrony.config.SynchronyConfigurationManager synchronyConfigurationManager, SynchronyMonitor synchronyMonitor, com.atlassian.confluence.plugins.synchrony.bootstrap.SynchronyExecutorServiceProvider executorServiceProvider, ClusterManager clusterManager, SynchronyProxyMonitor synchronyProxyMonitor, com.atlassian.event.api.EventPublisher eventPublisher, DownloadResourceManager downloadResourceManager, TomcatConfigHelper tomcatConfigHelper, HttpClientProvider httpClientProvider, com.atlassian.bandana.BandanaManager bandanaManager)
public Map<String,String> getConfiguration()
SynchronyProcessManagergetConfiguration in interface SynchronyProcessManagerpublic String getSynchronyProperty(SynchronyEnv env)
SynchronyProcessManagergetSynchronyProperty in interface SynchronyProcessManagerenv - the key that will be looked uppublic boolean isSynchronyStartingUp()
SynchronyProcessManagerisSynchronyStartingUp in interface SynchronyProcessManagerpublic boolean isSynchronyClusterManuallyManaged()
SynchronyProcessManagertrue 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.isSynchronyClusterManuallyManaged in interface SynchronyProcessManagertrue if external Synchrony cluster is used, and false if Confluence manage
Synchrony cluster on its own.public boolean isSynchronyOff()
SynchronyProcessManagertrue 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()isSynchronyOff in interface SynchronyProcessManagertrue if synchrony is switched off, and false otherwise.public void setSynchronyOff(boolean off)
SynchronyProcessManagersetSynchronyOff in interface SynchronyProcessManageroff - true if Synchrony should be disabled, and false if Synchrony should be
enabled.public io.atlassian.util.concurrent.Promise<Boolean> startup()
SynchronyProcessManagerstartup in interface SynchronyProcessManagerpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic boolean stop()
SynchronyProcessManagerstop in interface SynchronyProcessManagerpublic io.atlassian.util.concurrent.Promise<Boolean> restart()
SynchronyProcessManagerSynchronyProcessManager.stop() and then SynchronyProcessManager.startup().
However, this method waits for ExternalProcess.isAlive() to return false
in between stopping and starting.restart in interface SynchronyProcessManager@EventListener public void onCollabEditingModeChangedEvent(ClusterEventWrapper eventWrapper)
Copyright © 2003–2021 Atlassian. All rights reserved.