Property | Type | Description | |
---|---|---|---|
$notable |
Method | Description | |
---|---|---|
changeCronTaskStatus ( $enable = true ) | Enable or disable db replication check cron task | |
createDBSlaveConfig ( ) | Create a default slave DB configuration file | |
createMainConfig ( $host, $user, $password, $DBname ) : boolean | Create GLPI main configuration file | |
createSlaveConnectionFile ( $host, $user, $password, $DBname ) : boolean | Create slave DB configuration file | |
cronCheckDBreplicate ( $task ) | Cron process to check DB replicate state | |
cronInfo ( $name ) | ||
deleteDBSlaveConfig ( ) | Delete slave DB configuration file | |
displayMySQLError ( ) | Display a common mysql connection error | |
establishDBConnection ( $use_slave, $required, $display = true ) | Establish a connection to a mysql server (main or replicate) | |
getDBSlaveConf ( $choice = NULL ) : DBmysql | Read slave DB configuration file | |
getHistoryMaxDate ( $DBconnection ) | Get history max date of a GLPI DB | |
getReadConnection ( ) : DBmysql | Get Connection to slave, if exists, and if configured to be used for read only request | |
getReplicateDelay ( $choice = NULL ) : integer | Get delay between slave and master | |
getTypeName ( $nb ) | ||
isDBSlaveActive ( ) : true | Indicates is the DB replicate is active or not | |
saveDBSlaveConf ( $host, $user, $password, $DBname ) | Save changes to the slave DB configuration file | |
showAllReplicateDelay ( ) | Display in HTML, delay between master and slave 1 line per slave is multiple | |
showSystemInformations ( $width ) | ||
switchToMaster ( ) | Switch database connection to master | |
switchToSlave ( ) | Switch database connection to slave |
static public changeCronTaskStatus ( $enable = true ) |
static public createDBSlaveConfig ( ) |
static public createMainConfig ( $host, $user, $password, $DBname ) : boolean | ||
$user | ||
$password | ||
$DBname | ||
return | boolean |
static public createSlaveConnectionFile ( $host, $user, $password, $DBname ) : boolean | ||
return | boolean | for success |
static public cronCheckDBreplicate ( $task ) | ||
$task | to log and get param |
static public deleteDBSlaveConfig ( ) |
static public displayMySQLError ( ) |
static public establishDBConnection ( $use_slave, $required, $display = true ) | ||
$use_slave | try to connect to slave server first not to main server | |
$required | connection to the specified server is required (if connection failed, do not try to connect to the other server) | |
$display | display error message (true by default) |
static public getDBSlaveConf ( $choice = NULL ) : DBmysql | ||
$choice | integer, host number (default NULL) | |
return | DBmysql | object |
static public getHistoryMaxDate ( $DBconnection ) | ||
$DBconnection | DB conneciton used |
static public getReadConnection ( ) : DBmysql | ||
return | DBmysql | object |
static public getReplicateDelay ( $choice = NULL ) : integer | ||
$choice | integer, host number (default NULL) | |
return | integer |
static public isDBSlaveActive ( ) : true | ||
return | true | if active / false if not active |
static public saveDBSlaveConf ( $host, $user, $password, $DBname ) | ||
$host | ||
$user | ||
$password | ||
$DBname |
static public showAllReplicateDelay ( ) |
static public switchToMaster ( ) |
static public switchToSlave ( ) |