Class CachingVersionHistoryDao
java.lang.Object
com.atlassian.confluence.core.persistence.hibernate.CachingVersionHistoryDao
- All Implemented Interfaces:
VersionHistoryDao,VersionHistoryDaoInternal
A cache decorator around
VersionHistoryDaoInternal- Since:
- 7.14
-
Field Summary
Fields inherited from interface com.atlassian.confluence.core.persistence.VersionHistoryDao
UNKNOWN_BUILD_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionCachingVersionHistoryDao(VersionHistoryDaoInternal delegate, com.atlassian.cache.CacheFactory cacheFactory, SynchronizationManager synchronizationManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBuildToHistory(int buildNumber) The version history consists of a list of builds that Confluence has been successfully upgraded tovoidfinalizeBuild(int buildNumber) Record the provided build number as finalized.intObtains the latest build number to have been finalized usingVersionHistoryDao.finalizeBuild(int).intGet the highest build number from the database.getVersionHistory(int buildNumber) voidsave(VersionHistory versionHistory) booleanAssociates a tag with a build numberMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.internal.persistence.VersionHistoryDaoInternal
getUpgradeHistory
-
Constructor Details
-
CachingVersionHistoryDao
public CachingVersionHistoryDao(VersionHistoryDaoInternal delegate, com.atlassian.cache.CacheFactory cacheFactory, SynchronizationManager synchronizationManager)
-
-
Method Details
-
getLatestBuildNumber
public int getLatestBuildNumber()Description copied from interface:VersionHistoryDaoGet 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.
- Specified by:
getLatestBuildNumberin interfaceVersionHistoryDao- Returns:
- the highest build number in version history table, or UNKNOWN_BUILD_NUMBER if that can not be determined.
-
addBuildToHistory
public void addBuildToHistory(int buildNumber) Description copied from interface:VersionHistoryDaoThe version history consists of a list of builds that Confluence has been successfully upgraded to- Specified by:
addBuildToHistoryin interfaceVersionHistoryDao
-
getVersionHistory
- Specified by:
getVersionHistoryin interfaceVersionHistoryDao- Returns:
- the version history object associated with the build number (if there is more than one, return the latest)
-
tagBuild
Description copied from interface:VersionHistoryDaoAssociates a tag with a build number- Specified by:
tagBuildin interfaceVersionHistoryDao- Returns:
- true if the build number was successfully tagged, false if the tag specified has already been associated with this build number
-
getFullUpgradeHistory
- Specified by:
getFullUpgradeHistoryin interfaceVersionHistoryDaoInternal
-
save
- Specified by:
savein interfaceVersionHistoryDaoInternal
-
getFinalizedBuildNumber
public int getFinalizedBuildNumber()Description copied from interface:VersionHistoryDaoObtains the latest build number to have been finalized usingVersionHistoryDao.finalizeBuild(int).- Specified by:
getFinalizedBuildNumberin interfaceVersionHistoryDao- Returns:
- latest build number that has been finalized
-
finalizeBuild
public void finalizeBuild(int buildNumber) Description copied from interface:VersionHistoryDaoRecord 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.- Specified by:
finalizeBuildin interfaceVersionHistoryDao
-