Class DefaultSynchronyMonitor
java.lang.Object
com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyMonitor
- All Implemented Interfaces:
SynchronyMonitor
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSynchronyMonitor
(com.atlassian.confluence.plugins.synchrony.config.SynchronyConfigurationManager configurationManager, com.atlassian.confluence.plugins.synchrony.bootstrap.SynchronyExecutorServiceProvider executorServiceProvider, com.atlassian.sal.api.net.RequestFactory<?> requestFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels polling the Synchrony heartbeat rest endpoint if a poll is currently in progress, useful when Synchrony is shutdown before it is able to resolve a successful heartbeat result.boolean
Determines if the Synchrony that Confluence uses to connect to is currently running or not.io.atlassian.util.concurrent.Promise<Boolean>
Ping the Synchrony heartbeat rest endpoint, until the result is a 200 OK or a timeout is reached.
-
Constructor Details
-
DefaultSynchronyMonitor
@Autowired public DefaultSynchronyMonitor(com.atlassian.confluence.plugins.synchrony.config.SynchronyConfigurationManager configurationManager, com.atlassian.confluence.plugins.synchrony.bootstrap.SynchronyExecutorServiceProvider executorServiceProvider, com.atlassian.sal.api.net.RequestFactory<?> requestFactory)
-
-
Method Details
-
isSynchronyUp
public boolean isSynchronyUp()Description copied from interface:SynchronyMonitor
Determines if the Synchrony that Confluence uses to connect to is currently running or not.- Specified by:
isSynchronyUp
in interfaceSynchronyMonitor
- Returns:
- true iff Synchrony is running and responding to requests.
-
pollHeartbeat
Description copied from interface:SynchronyMonitor
Ping the Synchrony heartbeat rest endpoint, until the result is a 200 OK or a timeout is reached.- Specified by:
pollHeartbeat
in interfaceSynchronyMonitor
- Returns:
- a Promise with value true iff Synchrony responds with a successful heartbeat within the timeout.
-
cancelHeartbeat
public void cancelHeartbeat()Description copied from interface:SynchronyMonitor
Cancels polling the Synchrony heartbeat rest endpoint if a poll is currently in progress, useful when Synchrony is shutdown before it is able to resolve a successful heartbeat result.- Specified by:
cancelHeartbeat
in interfaceSynchronyMonitor
-