public class TomcatContainerSet extends Object implements ContainerSet<TomcatContainer>
Modifier and Type | Method and Description |
---|---|
void |
cleanDatabase()
Remove all Jira tables.
|
JiraCluster |
cluster()
Access an object that can perform operations on the JIRA cluster.
|
List<? extends TomcatContainer> |
getContainers() |
Path |
getSharedHome() |
void |
installJira(JiraType warType)
Installs a predefined JIRA WAR into all containers in the set.
|
void |
installSharedPlugin(Path pluginFile)
Installs a plugin into shared home.
|
void |
installTestingPlugins(JiraType jiraType)
Installs any plugins to shared home that are required for testing.
|
void |
installWar(Path warFile,
String context)
Installs a WAR file into all containers in the set.
|
Path |
jiraWarFile(JiraType warType)
Return the path of a predefined JIRA WAR file.
|
void |
reinitialiseDatabase()
Reinsert the basic Jira tables, so that Jira is initialised, licensed, but without any issues.
|
void |
resetClusterState()
Deprecated.
|
void |
resetDatabase()
Deprecated.
|
void |
setLicenseOnDatabase(String license)
Sets licence on database (should be run before container(s) start).
|
void |
setSharedHome(Path path)
Sets path to shared home.
|
void |
startAll()
Start all containers in the set.
|
void |
stopAll()
Cleanly stop all containers in the set.
|
Optional<Path> |
testingPluginFile(String name,
JiraType jarType)
Return the path to the plugin JAR file.
|
void |
waitForStartupOfActiveContainers()
Waits for a default maximum amount of time for all containers that are starting to complete startup and join the
cluster.
|
void |
waitForStartupOfActiveContainers(java.time.Duration timeout)
Waits at most the specified amount of time for all containers to finish starting up and join the cluster.
|
void |
waitForUpgradeState(ZeroDowntimeControl.UpgradeState targetState,
java.time.Duration timeout) |
public List<? extends TomcatContainer> getContainers()
getContainers
in interface ContainerSet<TomcatContainer>
public void startAll()
ContainerSet
startAll
in interface ContainerSet<TomcatContainer>
public void stopAll()
ContainerSet
stopAll
in interface ContainerSet<TomcatContainer>
public JiraCluster cluster()
ContainerSet
cluster
in interface ContainerSet<TomcatContainer>
public void installJira(JiraType warType)
ContainerSet
installJira
in interface ContainerSet<TomcatContainer>
warType
- the JIRA version to install.public Path jiraWarFile(JiraType warType)
ContainerSet
jiraWarFile
in interface ContainerSet<TomcatContainer>
warType
- JIRA version.public Optional<Path> testingPluginFile(String name, JiraType jarType)
ContainerSet
testingPluginFile
in interface ContainerSet<TomcatContainer>
name
- the name of the plugin. For example, "jira-ha-plugin"
will search for a file called "jira-ha-plugin-.*.jar"
.jarType
- JIRA version.public void installWar(Path warFile, String context)
ContainerSet
installWar
in interface ContainerSet<TomcatContainer>
warFile
- the WAR file to install.context
- the context path. Do not include any leading or trailing '/' characters.public void installTestingPlugins(JiraType jiraType)
ContainerSet
installTestingPlugins
in interface ContainerSet<TomcatContainer>
jiraType
- JIRA version to target.public void installSharedPlugin(Path pluginFile)
ContainerSet
installSharedPlugin
in interface ContainerSet<TomcatContainer>
pluginFile
- the plugin JAR/OBR file to install.@Deprecated public void resetClusterState()
ContainerSet
resetClusterState
in interface ContainerSet<TomcatContainer>
public void cleanDatabase()
ContainerSet
cleanDatabase
in interface ContainerSet<TomcatContainer>
public void reinitialiseDatabase()
ContainerSet
reinitialiseDatabase
in interface ContainerSet<TomcatContainer>
@Deprecated public void resetDatabase()
ContainerSet
resetDatabase
in interface ContainerSet<TomcatContainer>
public void setLicenseOnDatabase(String license)
ContainerSet
setLicenseOnDatabase
in interface ContainerSet<TomcatContainer>
public Path getSharedHome()
getSharedHome
in interface ContainerSet<TomcatContainer>
public void setSharedHome(Path path)
ContainerSet
setSharedHome
in interface ContainerSet<TomcatContainer>
path
- shared home path.public void waitForUpgradeState(ZeroDowntimeControl.UpgradeState targetState, java.time.Duration timeout)
waitForUpgradeState
in interface ContainerSet<TomcatContainer>
public void waitForStartupOfActiveContainers(java.time.Duration timeout)
ContainerSet
waitForStartupOfActiveContainers
in interface ContainerSet<TomcatContainer>
timeout
- the maximum amount of time to wait.public void waitForStartupOfActiveContainers()
ContainerSet
waitForStartupOfActiveContainers
in interface ContainerSet<TomcatContainer>
Copyright © 2002-2022 Atlassian. All Rights Reserved.