public class SplitIndexUpgradeTask extends AbstractUpgradeTask
Modifier and Type | Field and Description |
---|---|
static String |
BUILD_NUMBER |
static String |
CHANGE |
static String |
CONTENT |
static String |
DESCRIPTION |
static URL |
KB_URL |
Constructor and Description |
---|
SplitIndexUpgradeTask(@NonNull com.atlassian.bonnie.ILuceneConnection contentConnection,
@NonNull com.atlassian.bonnie.ILuceneConnection changesConnection,
@NonNull I18NBeanFactory i18NBeanFactory,
@NonNull JournalStateStore journalStateStore,
@NonNull JournalIdentifier contentJournalIdentifier,
@NonNull JournalIdentifier changeJournalIdentifier,
@NonNull SplitIndexSnapshotManager snapshotManager)
Creates a new SplitIndexUpgradeTask that will split the index.
|
Modifier and Type | Method and Description |
---|---|
boolean |
breaksBackwardCompatibility()
Returns true if a new export can't be imported in an older instance.
|
void |
doUpgrade()
Perform the upgrade.
|
String |
getBuildNumber() |
String |
getShortDescription()
A short (<50 chars) description of the upgrade action
|
boolean |
runOnSpaceImport()
Returns true if an older Space can't be imported in a new instance without running this task.
|
boolean |
upgradeUnderConnectionWriteLock() |
void |
validate()
This is only implemented in this abstract base class for the convenience of the large number of older
upgrade tasks.
|
addAllErrors, addError, addError, getConstraint, getErrors, getName, isDatabaseUpgrade, setBeanName, setBuildNumber
public static final String BUILD_NUMBER
public static final String DESCRIPTION
public static final String CONTENT
public static final String CHANGE
public static final URL KB_URL
public SplitIndexUpgradeTask(@NonNull com.atlassian.bonnie.ILuceneConnection contentConnection, @NonNull com.atlassian.bonnie.ILuceneConnection changesConnection, @NonNull I18NBeanFactory i18NBeanFactory, @NonNull JournalStateStore journalStateStore, @NonNull JournalIdentifier contentJournalIdentifier, @NonNull JournalIdentifier changeJournalIdentifier, @NonNull SplitIndexSnapshotManager snapshotManager)
contentConnection
- lucene connection for content indexchangesConnection
- lucene connection for changes indexi18NBeanFactory
- I18NBeanFactory to help with the parameterised messages.public void validate() throws Exception
AbstractUpgradeTask
This is only implemented in this abstract base class for the convenience of the large number of older upgrade tasks.
If you are implementing a new UpgradeTask you must give some consideration to implementing validation as well.
validate
in interface UpgradeTask
validate
in class AbstractUpgradeTask
Exception
public void doUpgrade() throws UpgradeException
UpgradeTask
UpgradeException
public boolean upgradeUnderConnectionWriteLock() throws UpgradeException
UpgradeException
public String getShortDescription()
UpgradeTaskInfo
getShortDescription
in interface UpgradeTaskInfo
getShortDescription
in class AbstractUpgradeTask
public String getBuildNumber()
getBuildNumber
in interface UpgradeTaskInfo
getBuildNumber
in class AbstractUpgradeTask
public boolean runOnSpaceImport()
BackupSupport
Note that tasks don't run on space import yet, so we just reject the import in this case.
public boolean breaksBackwardCompatibility()
BackupSupport
Breaking compatibility means a snapshot of the new version will not work at all with the previous version. For example:
Copyright © 2003–2023 Atlassian. All rights reserved.