PHP Class Scalr_Role_Behavior

Mostrar archivo Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$db ADODB_mysqli

Protected Properties

Property Type Description
$behavior
$crypto Scalr\Util\CryptoTool

Public Methods

Method Description
__construct ( $behavior = ROLE_BEHAVIORS::BASE )
extendMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
getBaseConfiguration ( DBServer $dbServer, $isHostInit = false, $onlyBase = false )
getConfiguration ( DBServer $dbServer )
getDnsRecords ( DBServer $dbServer )
getListForFarmRole ( DBFarmRole $farmRole ) : Scalr_Role_Behavior[] Enter description here .
getListForRole ( DBRole $role ) : Scalr_Role_Behavior[] Enter description here .
getSecurityRules ( )
getSnapshotConfig ( DBFarmRole $dbFarmRole, DBServer $dbServer )
getVolumeConfig ( DBFarmRole $dbFarmRole, DBServer $dbServer )
handleMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer ) Handle message from scalarizr
loadByName ( unknown_type $name ) : Scalr_Role_Behavior
makeUpscaleDecision ( DBFarmRole $dbFarmRole )
onBeforeHostTerminate ( DBServer $dbServer )
onBeforeInstanceLaunch ( DBServer $dbServer )
onFarmSave ( DBFarm $dbFarm, DBFarmRole $dbFarmRole )
onFarmTerminated ( DBFarmRole $dbFarmRole )
onHostDown ( DBServer $dbServer, HostDownEvent $event ) OnHostDown handler
setSnapshotConfig ( $snapshotConfig, DBFarmRole $dbFarmRole, DBServer $dbServer )
setVolumeConfig ( $volumeConfig, DBFarmRole $dbFarmRole, DBServer $dbServer )
setupBehavior ( FarmRole $farmRole ) Setups farm role settings related to this behavior

Protected Methods

Method Description
getCrypto ( ) : Scalr\Util\CryptoTool

Method Details

__construct() public method

public __construct ( $behavior = ROLE_BEHAVIORS::BASE )

extendMessage() public method

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

getBaseConfiguration() public method

public getBaseConfiguration ( DBServer $dbServer, $isHostInit = false, $onlyBase = false )
$dbServer DBServer

getConfiguration() public method

public getConfiguration ( DBServer $dbServer )
$dbServer DBServer

getCrypto() protected method

protected getCrypto ( ) : Scalr\Util\CryptoTool
return Scalr\Util\CryptoTool

getDnsRecords() public method

public getDnsRecords ( DBServer $dbServer )
$dbServer DBServer

getListForFarmRole() public static method

..
public static getListForFarmRole ( DBFarmRole $farmRole ) : Scalr_Role_Behavior[]
$farmRole DBFarmRole
return Scalr_Role_Behavior[]

getListForRole() public static method

..
public static getListForRole ( DBRole $role ) : Scalr_Role_Behavior[]
$role DBRole
return Scalr_Role_Behavior[]

getSecurityRules() public method

public getSecurityRules ( )

getSnapshotConfig() public method

public getSnapshotConfig ( DBFarmRole $dbFarmRole, DBServer $dbServer )
$dbFarmRole DBFarmRole
$dbServer DBServer

getVolumeConfig() public method

public getVolumeConfig ( DBFarmRole $dbFarmRole, DBServer $dbServer )
$dbFarmRole DBFarmRole
$dbServer DBServer

handleMessage() public method

Handle message from scalarizr
public handleMessage ( Scalr_Messaging_Msg $message, DBServer $dbServer )
$message Scalr_Messaging_Msg
$dbServer DBServer

loadByName() public static method

public static loadByName ( unknown_type $name ) : Scalr_Role_Behavior
$name unknown_type
return Scalr_Role_Behavior

makeUpscaleDecision() public method

public makeUpscaleDecision ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole

onBeforeHostTerminate() public method

public onBeforeHostTerminate ( DBServer $dbServer )
$dbServer DBServer

onBeforeInstanceLaunch() public method

public onBeforeInstanceLaunch ( DBServer $dbServer )
$dbServer DBServer

onFarmSave() public method

public onFarmSave ( DBFarm $dbFarm, DBFarmRole $dbFarmRole )
$dbFarm DBFarm
$dbFarmRole DBFarmRole

onFarmTerminated() public method

public onFarmTerminated ( DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRole

onHostDown() public method

OnHostDown handler
public onHostDown ( DBServer $dbServer, HostDownEvent $event )
$dbServer DBServer DBServer instance
$event HostDownEvent Event

setSnapshotConfig() public method

public setSnapshotConfig ( $snapshotConfig, DBFarmRole $dbFarmRole, DBServer $dbServer )
$dbFarmRole DBFarmRole
$dbServer DBServer

setVolumeConfig() public method

public setVolumeConfig ( $volumeConfig, DBFarmRole $dbFarmRole, DBServer $dbServer )
$dbFarmRole DBFarmRole
$dbServer DBServer

setupBehavior() public static method

Setups farm role settings related to this behavior
public static setupBehavior ( FarmRole $farmRole )
$farmRole Scalr\Model\Entity\FarmRole Farm-role to which setting behavior

Property Details

$behavior protected_oe property

protected $behavior

$crypto protected_oe property

protected CryptoTool,Scalr\Util $crypto
return Scalr\Util\CryptoTool

$db public_oe property

public ADODB_mysqli $db
return ADODB_mysqli