Class ConfluenceLockerOnSiteRestore

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    public class ConfluenceLockerOnSiteRestore
    extends Object
    implements org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
    Locks the whole UI on site restore. In addition, provides basic information about the progress. This class is supposed to work in cluster, so its methods should not be called directly. Instead, events should be sent, so any cluster node will know the current state.
    • Constructor Detail

      • ConfluenceLockerOnSiteRestore

        public ConfluenceLockerOnSiteRestore​(com.atlassian.event.api.EventPublisher eventPublisher,
                                             JohnsonEventFactory johnsonEventFactory)
    • Method Detail

      • isDatabaseLocked

        public static boolean isDatabaseLocked()
        Indicates whether database should be locked because of site restore
      • isDisplayJohnson

        public static boolean isDisplayJohnson()
        Indicates whether we should display Johnson page about restore progress/failure
      • assertDatabaseIsNotLocked

        public static void assertDatabaseIsNotLocked()
                                              throws IllegalStateException
        Does nothing is the database is not locked.
        IllegalStateException - when the database is locked (by the site restore)
      • handleEvent

        public void handleEvent​(ClusterEventWrapper eventWrapper)
        Receives events from other nodes.
      • handleEvent

        public void handleEvent​(AbstractRestoreEvent abstractRestoreEvent)
        Receives AbstractRestoreEvent events from the same node.
      • afterPropertiesSet

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

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