Class DefaultSynchronyMonitor

java.lang.Object
com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyMonitor
All Implemented Interfaces:
SynchronyMonitor

@Component public class DefaultSynchronyMonitor extends Object implements SynchronyMonitor
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface SynchronyMonitor
      Returns:
      true iff Synchrony is running and responding to requests.
    • pollHeartbeat

      public io.atlassian.util.concurrent.Promise<Boolean> 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 interface SynchronyMonitor
      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 interface SynchronyMonitor