public class JiraHomeReplicatorService extends AbstractService implements Startable
| Modifier and Type | Class and Description |
|---|---|
class |
JiraHomeReplicatorService.FullReplicationJob |
class |
JiraHomeReplicatorService.QueueDrainingJob |
static class |
JiraHomeReplicatorService.ReplicationResult |
log, name, SERVICE_EVENTNAME_COMPARATOR| Constructor and Description |
|---|
JiraHomeReplicatorService(JiraHome jiraHome,
SecondaryJiraHome secondaryHome,
ApplicationProperties applicationProperties,
AttachmentConfigStore attachmentConfigStore,
PluginPath pluginPath,
com.atlassian.beehive.ClusterLockService clusterLockService,
com.atlassian.scheduler.SchedulerService schedulerService,
JiraProperties jiraProperties,
AvatarFileStoreProvider avatarFileStoreProvider,
AttachmentFileStoreProvider attachmentFileStoreProvider) |
| Modifier and Type | Method and Description |
|---|---|
ObjectConfiguration |
getObjectConfiguration()
Retrieves an object configuration object with properties that can be set
|
Collection<JiraHomeChangeEvent.FileType> |
getReplicableFileTypes()
Returns the types of files that this service will replicate.
|
boolean |
isEnabled(JiraHomeChangeEvent.FileType fileType)
Indicates whether the given file type is enabled for replication.
|
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.
|
void |
onFileChangeEvent(JiraHomeChangeEvent event)
For every file changed event, we perform an async task to add/move/delete the file.
|
void |
replicateJiraHome()
Request a full replication of files in the home directories that are configured for replication.
|
void |
run()
This method must be implemented in a subclass, and performs the functionality
that the service performs.
|
void |
shutDown(ComponentManagerShutdownEvent shutdownEvent) |
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
destroy, getDefaultProperty, getDescription, getKey, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, init, isInternal, isUnique, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic JiraHomeReplicatorService(JiraHome jiraHome, SecondaryJiraHome secondaryHome, ApplicationProperties applicationProperties, AttachmentConfigStore attachmentConfigStore, PluginPath pluginPath, com.atlassian.beehive.ClusterLockService clusterLockService, com.atlassian.scheduler.SchedulerService schedulerService, JiraProperties jiraProperties, AvatarFileStoreProvider avatarFileStoreProvider, AttachmentFileStoreProvider attachmentFileStoreProvider)
public void start()
throws Exception
Startable@EventListener public void onFileChangeEvent(JiraHomeChangeEvent event)
event - the event@EventListener public void shutDown(ComponentManagerShutdownEvent shutdownEvent)
public boolean isEnabled(JiraHomeChangeEvent.FileType fileType)
fileType - the file typepublic boolean isReplicating()
public void replicateJiraHome()
throws com.atlassian.scheduler.SchedulerServiceException
com.atlassian.scheduler.SchedulerServiceExceptionpublic void run()
AbstractServicerun in interface JiraServicerun in interface Runnablerun in class AbstractServiceJiraService.init(com.opensymphony.module.propertyset.PropertySet)public ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
ObjectConfigurablegetObjectConfiguration in interface ObjectConfigurableObjectConfigurationException@Nonnull public Collection<JiraHomeChangeEvent.FileType> getReplicableFileTypes()
Copyright © 2002-2024 Atlassian. All Rights Reserved.