Class ConfluenceLockerOnSiteRestore
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.confluencelocker.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.
- Since:
- 8.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionConfluenceLockerOnSiteRestore
(com.atlassian.event.api.EventPublisher eventPublisher, JohnsonEventFactory johnsonEventFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
Does nothing is the database is not locked.void
destroy()
void
handleEvent
(AbstractRestoreEvent abstractRestoreEvent) Receives AbstractRestoreEvent events from the same node.void
handleEvent
(ClusterEventWrapper eventWrapper) Receives events from other nodes.static boolean
Indicates whether database should be locked because of site restorestatic boolean
Indicates whether we should display Johnson page about restore progress/failure
-
Constructor Details
-
ConfluenceLockerOnSiteRestore
public ConfluenceLockerOnSiteRestore(com.atlassian.event.api.EventPublisher eventPublisher, JohnsonEventFactory johnsonEventFactory)
-
-
Method Details
-
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
Does nothing is the database is not locked.- Throws:
IllegalStateException
- when the database is locked (by the site restore)
-
handleEvent
Receives events from other nodes. -
handleEvent
Receives AbstractRestoreEvent events from the same node. -
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-