PHP Class Scalr_Role_DbMsrBehavior

Inheritance: extends Scalr_Role_Behavior
Exibir arquivo Open project: scalr/scalr Class Usage Examples

Protected Properties

Property Type Description
$behavior

Public Methods

Method Description
__construct ( $behaviorName )
createBackup ( DBFarmRole $dbFarmRole ) Creates backup
createDataBundle ( DBFarmRole $dbFarmRole, array $params = [] ) Creates data bundle
extendMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
getMasterServer ( DBFarmRole $dbFarmRole )
getServerForBackup ( DBFarmRole $dbFarmRole ) : DBServer | null Retrieves server for backup
getServerForDataBundle ( DBFarmRole $dbFarmRole, string $useSlave = false ) : DBServer Retrieves server to create data bundle
handleMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
makeUpscaleDecision ( DBFarmRole $dbFarmRole )
onFarmTerminated ( DBFarmRole $dbFarmRole )

Private Methods

Method Description
updateBackupHistory ( DBServer $dbServer, $operation, $status, $error = "" )

Method Details

__construct() public method

public __construct ( $behaviorName )

createBackup() public method

Creates backup
public createBackup ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole DBFarmRole to create backup

createDataBundle() public method

Creates data bundle
public createDataBundle ( DBFarmRole $dbFarmRole, array $params = [] )
$dbFarmRole DBFarmRole DBFarmRole object to create data bundle
$params array optional Additional parameters

extendMessage() public method

public extendMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
$message Scalr_Messaging_Msg
$dbServer DBServer

getMasterServer() public method

public getMasterServer ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole

getServerForBackup() public method

Retrieves server for backup
public getServerForBackup ( DBFarmRole $dbFarmRole ) : DBServer | null
$dbFarmRole DBFarmRole DBFarmRole object to search
return DBServer | null Returns server or null

getServerForDataBundle() public method

Retrieves server to create data bundle
public getServerForDataBundle ( DBFarmRole $dbFarmRole, string $useSlave = false ) : DBServer
$dbFarmRole DBFarmRole FarmRole object
$useSlave string optional Should it use slave
return DBServer Returns dbserver

handleMessage() public method

See also: Scalr_Role_Behavior::handleMessage()
public handleMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
$message Scalr_Messaging_Msg
$dbServer DBServer

makeUpscaleDecision() public method

public makeUpscaleDecision ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole

onFarmTerminated() public method

public onFarmTerminated ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole

Property Details

$behavior protected_oe property

protected $behavior