Interface VersionHistoryDao
- All Known Subinterfaces:
VersionHistoryDaoInternal
- All Known Implementing Classes:
CachingVersionHistoryDao
,HibernateVersionHistoryDao
@Transactional
public interface VersionHistoryDao
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBuildToHistory
(int buildNumber) The version history consists of a list of builds that Confluence has been successfully upgraded tovoid
finalizeBuild
(int buildNumber) Record the provided build number as finalized.int
Obtains the latest build number to have been finalized usingfinalizeBuild(int)
.int
Get the highest build number from the database.getUpgradeHistory
(int start, int maxResults) Get the history of all the upgrades.getVersionHistory
(int buildNumber) boolean
Associates a tag with a build number
-
Field Details
-
UNKNOWN_BUILD_NUMBER
static final int UNKNOWN_BUILD_NUMBER- See Also:
-
-
Method Details
-
getLatestBuildNumber
@Transactional(readOnly=true) int getLatestBuildNumber()Get the highest build number from the database. This should represent what version the database thinks Confluence is running at, which in turn is used to schedule database-hitting upgrade tasks.If the number can not be determined (there are no versions in the database, or the version history table hasn't even been created yet) then the method will return UNKNOWN_BUILD_NUMBER. In this case, callers should assume that the database build number is identical to the configured build number.
- Returns:
- the highest build number in version history table, or UNKNOWN_BUILD_NUMBER if that can not be determined.
-
addBuildToHistory
void addBuildToHistory(int buildNumber) The version history consists of a list of builds that Confluence has been successfully upgraded to- Parameters:
buildNumber
-
-
getVersionHistory
- Parameters:
buildNumber
-- Returns:
- the version history object associated with the build number (if there is more than one, return the latest)
-
tagBuild
Associates a tag with a build number- Returns:
- true if the build number was successfully tagged, false if the tag specified has already been associated with this build number
-
getUpgradeHistory
Get the history of all the upgrades. Returns time ordered list of versions this instance was at some point running.- Parameters:
start
-maxResults
-- Returns:
- the list of each of versions this instance was running at some point in descending order (the current version first) .
-
getFinalizedBuildNumber
@Transactional(readOnly=true, propagation=REQUIRES_NEW) int getFinalizedBuildNumber()Obtains the latest build number to have been finalized usingfinalizeBuild(int)
.- Returns:
- latest build number that has been finalized
- Since:
- 7.14
-
finalizeBuild
void finalizeBuild(int buildNumber) Record the provided build number as finalized. This occurs when a cluster exists ZDU mode at the end of an upgrade, or is upgraded without ZDU mode.- Parameters:
buildNumber
-- Since:
- 7.14
-