Class JiraHomeReplicatorService

java.lang.Object
com.atlassian.jira.service.AbstractService
com.atlassian.jira.cluster.disasterrecovery.JiraHomeReplicatorService
All Implemented Interfaces:
ObjectConfigurable, Startable, JiraService, Runnable

public class JiraHomeReplicatorService extends AbstractService implements Startable
Secondary Jira Home that tracks changes to attachment, index, avatar and plugin files.
Since:
v6.4
  • Constructor Details

  • Method Details

    • start

      public void start() throws Exception
      Description copied from interface: Startable
      This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
      Specified by:
      start in interface Startable
      Throws:
      Exception - Allows implementations to throw an Exception.
    • onFileChangeEvent

      @EventListener public void onFileChangeEvent(JiraHomeChangeEvent event)
      For every file changed event, we perform an async task to add/move/delete the file.
      Parameters:
      event - the event
    • shutDown

      @EventListener public void shutDown(ComponentManagerShutdownEvent shutdownEvent)
    • isEnabled

      public boolean isEnabled(JiraHomeChangeEvent.FileType fileType)
      Indicates whether the given file type is enabled for replication.
      Parameters:
      fileType - the file type
      Returns:
      see description
    • isReplicating

      public boolean isReplicating()
      Indicates whether the replicator service is doing a full replication, namely scanning the enabled directories for differences between Jira home and the secondary store.
      Returns:
      true if a replication is currently in progress
    • replicateJiraHome

      public void replicateJiraHome() throws com.atlassian.scheduler.SchedulerServiceException
      Request a full replication of files in the home directories that are configured for replication.
      Throws:
      com.atlassian.scheduler.SchedulerServiceException
    • run

      public void run()
      Description copied from class: AbstractService
      This method must be implemented in a subclass, and performs the functionality that the service performs. This method is called after the duration specified through the administration web interface.
      Specified by:
      run in interface JiraService
      Specified by:
      run in interface Runnable
      Specified by:
      run in class AbstractService
      See Also:
    • getObjectConfiguration

      public ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
      Description copied from interface: ObjectConfigurable
      Retrieves an object configuration object with properties that can be set
      Specified by:
      getObjectConfiguration in interface ObjectConfigurable
      Returns:
      ObjectConfiguration object
      Throws:
      ObjectConfigurationException
    • getReplicableFileTypes

      @Nonnull public Collection<JiraHomeChangeEvent.FileType> getReplicableFileTypes()
      Returns the types of files that this service will replicate.
      Returns:
      see description