Package com.atlassian.bamboo.health
Class MySQLChecksImpl
- java.lang.Object
-
- com.atlassian.bamboo.health.MySQLChecksImpl
-
- All Implemented Interfaces:
MySQLChecks
public class MySQLChecksImpl extends Object implements MySQLChecks
-
-
Constructor Summary
Constructors Constructor Description MySQLChecksImpl(org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getInnoDBLogFileSize()
long
getMaxAllowedPacketSize()
long
getRecommendedInnoDBLogFileSize()
long
getRecommendedMaxPacketsSize()
boolean
isCharacterSetCheckPass()
boolean
isCollationCheckPass()
boolean
isInnoDBLogFileSizeCheckPass()
boolean
isMaxAllowedPacketSizeCheckPass()
-
-
-
Method Detail
-
isMaxAllowedPacketSizeCheckPass
public boolean isMaxAllowedPacketSizeCheckPass() throws IllegalStateException
- Specified by:
isMaxAllowedPacketSizeCheckPass
in interfaceMySQLChecks
- Returns:
- true if DB "max_allowed_packet" size is greater or equals
MySQLChecks.getRecommendedMaxPacketsSize()
- Throws:
IllegalStateException
- if can't connect to DB
-
getMaxAllowedPacketSize
public long getMaxAllowedPacketSize()
- Specified by:
getMaxAllowedPacketSize
in interfaceMySQLChecks
- Returns:
- max allowed packet size from DB settings
-
getRecommendedMaxPacketsSize
public long getRecommendedMaxPacketsSize()
- Specified by:
getRecommendedMaxPacketsSize
in interfaceMySQLChecks
-
isCharacterSetCheckPass
public boolean isCharacterSetCheckPass()
- Specified by:
isCharacterSetCheckPass
in interfaceMySQLChecks
- Returns:
- true if DB's character set is recommended "utf8mb4" or "utf8"
-
isCollationCheckPass
public boolean isCollationCheckPass()
- Specified by:
isCollationCheckPass
in interfaceMySQLChecks
- Returns:
- true if DB's collation is recommented "utf8mb4_bin" or "utf8_bin"
-
isInnoDBLogFileSizeCheckPass
public boolean isInnoDBLogFileSizeCheckPass()
- Specified by:
isInnoDBLogFileSizeCheckPass
in interfaceMySQLChecks
- Returns:
- true if log file size is greater or equals
MySQLChecks.getRecommendedInnoDBLogFileSize()
-
getInnoDBLogFileSize
public long getInnoDBLogFileSize()
- Specified by:
getInnoDBLogFileSize
in interfaceMySQLChecks
- Returns:
- actual DB log file size
-
getRecommendedInnoDBLogFileSize
public long getRecommendedInnoDBLogFileSize()
- Specified by:
getRecommendedInnoDBLogFileSize
in interfaceMySQLChecks
-
-