@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()
SynchronyProcessManager
getConfiguration
in interface SynchronyProcessManager
public String getSynchronyProperty(SynchronyEnv env)
SynchronyProcessManager
getSynchronyProperty
in interface SynchronyProcessManager
env
- the key that will be looked uppublic boolean isSynchronyStartingUp()
SynchronyProcessManager
isSynchronyStartingUp
in interface SynchronyProcessManager
public boolean isSynchronyClusterManuallyManaged()
SynchronyProcessManager
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.isSynchronyClusterManuallyManaged
in interface SynchronyProcessManager
true
if external Synchrony cluster is used, and false
if Confluence manage
Synchrony cluster on its own.public boolean isSynchronyOff()
SynchronyProcessManager
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()
isSynchronyOff
in interface SynchronyProcessManager
true
if synchrony is switched off, and false
otherwise.public void setSynchronyOff(boolean off)
SynchronyProcessManager
setSynchronyOff
in interface SynchronyProcessManager
off
- true
if Synchrony should be disabled, and false
if Synchrony should be
enabled.public io.atlassian.util.concurrent.Promise<Boolean> startup()
SynchronyProcessManager
startup
in interface SynchronyProcessManager
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public boolean stop()
SynchronyProcessManager
stop
in interface SynchronyProcessManager
public io.atlassian.util.concurrent.Promise<Boolean> restart()
SynchronyProcessManager
SynchronyProcessManager.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–2019 Atlassian. All rights reserved.