public class DefaultIndexRecoveryService extends Object implements IndexRecoveryService, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
IndexRecoveryService.| Constructor and Description |
|---|
DefaultIndexRecoveryService(JournalStateStore journalStateStore,
JournalDao journalDao,
ClusterManager clusterManager,
com.atlassian.event.api.EventPublisher eventPublisher,
ClusterEventWrapperService clusterEventWrapperService,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
void |
handleEvent(ClusterEventWrapper eventWrapper) |
boolean |
isIndexRecoveryRequired(JournalIdentifier journalId,
String indexDirName)
Checks to see whether the index needs to be recovered.
|
boolean |
recoverIndex(JournalIdentifier journalId,
String indexDirName)
Recovers the index required by asking other nodes in the cluster for a snapshot of their index
and copying it to its local home directory.
|
public DefaultIndexRecoveryService(JournalStateStore journalStateStore, JournalDao journalDao, ClusterManager clusterManager, com.atlassian.event.api.EventPublisher eventPublisher, ClusterEventWrapperService clusterEventWrapperService, com.atlassian.plugin.PluginAccessor pluginAccessor)
public boolean isIndexRecoveryRequired(JournalIdentifier journalId, String indexDirName)
IndexRecoveryServiceisIndexRecoveryRequired in interface IndexRecoveryServicejournalId - the index to check whether it needs to be recoveredindexDirName - the name of the subdirectory containing the Lucene indexpublic boolean recoverIndex(JournalIdentifier journalId, String indexDirName)
IndexRecoveryServicerecoverIndex in interface IndexRecoveryServicejournalId - the index to recoverindexDirName - the name of the subdirectory containing the Lucene index@EventListener public void handleEvent(ClusterEventWrapper eventWrapper) throws Exception
Exceptionpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionCopyright © 2003–2015 Atlassian. All rights reserved.