PHP 클래스 Scalr\System\Zmq\Cron\AbstractTask

Task queue boilerplate.
부터: 5.0.1 (10.09.2014)
저자: Vitaliy Demidov ([email protected])
상속: implements Scalr\System\Zmq\Cron\TaskInterface, use trait Scalr\LoggerAwareTrait
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$name string Task name
$queue ArrayObject Task queue

공개 메소드들

메소드 설명
__construct ( ) Constructor
addWorker ( $address = null )
checkMemoryUsage ( )
config ( ) : object Gets config for this cron
getAuditLoggerConfig ( )
getName ( )
getReplicaAccounts ( ) : array Gets accounts to replicate a service to process its queue in the separate workers
getReplicaTypes ( string $name = 'type', string $regex = null ) : array Gets types to replicate a service to process its queue in the separate workers
getScalrService ( ) : ScalrService Gets Scalr service
isServiceRegistered ( string $serviceName = null ) : integer | boolean Checks whether service is registered with the broker
launch ( )
onCompleted ( )
onResponse ( Scalr\System\Zmq\Cron\AbstractPayload $payload )
run ( )
shutdown ( )

보호된 메소드들

메소드 설명
launchClient ( ) : integer Runs ZMQ MDP Asynchronous Client
launchWorkers ( string $address = null ) : integer It launches pool of workers

비공개 메소드들

메소드 설명
_launchWorkers ( string $address = null, integer $workers = null ) : integer It launches pool of workers
terminateWorker ( integer $pid ) Terminates one worker by specified pid

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

addWorker() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::addWorker()
public addWorker ( $address = null )

checkMemoryUsage() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::checkMemoryUsage()
public checkMemoryUsage ( )

config() 공개 메소드

Gets config for this cron
public config ( ) : object
리턴 object Returns configuration options for the task

getAuditLoggerConfig() 공개 메소드

또한 보기: Scalr\LogCollector\AuditLoggerRetrieveConfigurationInterface::getAuditLoggerConfig()

getName() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::getName()
public getName ( )

getReplicaAccounts() 공개 메소드

Gets accounts to replicate a service to process its queue in the separate workers
public getReplicaAccounts ( ) : array
리턴 array Returns the list of the accounts to replicate

getReplicaTypes() 공개 메소드

Gets types to replicate a service to process its queue in the separate workers
public getReplicaTypes ( string $name = 'type', string $regex = null ) : array
$name string optional The name of the replica type in the config
$regex string optional Regex to validate. It should be specified without anchors and modifiers
리턴 array Returns the list of the types to replicate

getScalrService() 공개 메소드

Gets Scalr service
public getScalrService ( ) : ScalrService
리턴 Scalr\Model\Entity\ScalrService Returns ScalrService instance for the current task

isServiceRegistered() 공개 메소드

Checks whether service is registered with the broker
public isServiceRegistered ( string $serviceName = null ) : integer | boolean
$serviceName string optional The name of the service.
리턴 integer | boolean Returns the number of registered workers if service has been registered with the broker or boolean FALSE otherwise

launch() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::launch()
public launch ( )

launchClient() 보호된 메소드

Runs ZMQ MDP Asynchronous Client
protected launchClient ( ) : integer
리턴 integer The number of launched workers

launchWorkers() 보호된 메소드

It launches pool of workers
protected launchWorkers ( string $address = null ) : integer
$address string optional An address to override the service name
리턴 integer The number of launched workers

onCompleted() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::onCompleted()
public onCompleted ( )

onResponse() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::onResponse()
public onResponse ( Scalr\System\Zmq\Cron\AbstractPayload $payload )
$payload Scalr\System\Zmq\Cron\AbstractPayload

run() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::run()
public run ( )

shutdown() 공개 메소드

또한 보기: Scalr\System\Zmq\Cron\TaskInterface::shutdown()
public shutdown ( )

프로퍼티 상세

$name 보호되어 있는 프로퍼티

Task name
protected string $name
리턴 string

$queue 보호되어 있는 프로퍼티

Task queue
protected ArrayObject $queue
리턴 ArrayObject