프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$commandKey | string | Command Key, used for grouping Circuit Breakers | |
$config | Zend\Config\Config | Command configuration | |
$serviceLocator | Zend\Di\LocatorInterface |
메소드 | 설명 | |
---|---|---|
execute ( ) : mixed | Executes the command Isolation and fault tolerance logic (Circuit Breaker) is built-in | |
getCommandKey ( ) : string | Determines and returns command key, used for circuit breaker grouping and metrics tracking | |
getExecutionEvents ( ) : array | Returns events collected | |
getExecutionException ( ) : Exceptio\Exception | null | Returns exception thrown while executing the command, if there was any | |
getExecutionTimeInMilliseconds ( ) : null | integer | Returns execution time in milliseconds, null if not executed | |
initializeConfig ( Zend\Config\Config $phystrixConfig ) | Sets base command configuration from the global phystrix configuration | |
setCircuitBreakerFactory ( Odesk\Phystrix\CircuitBreakerFactory $circuitBreakerFactory ) | Sets instance of circuit breaker factory | |
setCommandMetricsFactory ( Odesk\Phystrix\CommandMetricsFactory $commandMetricsFactory ) | Sets instance of command metrics factory | |
setConfig ( Zend\Config\Config $config, boolean $merge = true ) | Sets configuration for the command, allows to override config in runtime | |
setRequestCache ( |
Sets shared object for request caching | |
setRequestLog ( Odesk\Phystrix\RequestLog $requestLog ) | Sets shared object for request logging | |
setServiceLocator ( Zend\Di\LocatorInterface $serviceLocator ) | Sets service locator instance, for injecting custom dependencies into the command |
메소드 | 설명 | |
---|---|---|
getCacheKey ( ) : string | null | Key to be used for request caching. | |
getFallback ( ) | Code for when execution fails for whatever reason | |
prepare ( ) | Custom preparation logic, preceding command execution | |
processExecutionEvent ( string $eventName ) | Custom logic proceeding event generation | |
run ( ) : mixed | The code to be executed |
메소드 | 설명 | |
---|---|---|
getCircuitBreaker ( ) : Odesk\Phystrix\CircuitBreaker | Circuit breaker for this command key | |
getFallbackOrThrowException ( Exception $originalException = null ) : mixed | Attempts to retrieve fallback by calling getFallback | |
getMetrics ( ) : Odesk\Phystrix\CommandMetrics | Command Metrics for this command key | |
getTimeInMilliseconds ( ) : float | Returns current time on the server in milliseconds | |
isRequestCacheEnabled ( ) : boolean | Determines whether request caching is enabled for this command | |
recordExecutedCommand ( ) | Adds reference to the command to the current request log | |
recordExecutionEvent ( string $eventName ) | Logic to record events and exceptions as they take place | |
recordExecutionTime ( ) | Records command execution time if the command was executed, not short-circuited and not returned from cache |
protected getCacheKey ( ) : string | null | ||
리턴 | string | null |
public getCommandKey ( ) : string | ||
리턴 | string |
public getExecutionException ( ) : Exceptio\Exception | null | ||
리턴 | Exceptio\Exception | null |
public getExecutionTimeInMilliseconds ( ) : null | integer | ||
리턴 | null | integer |
public initializeConfig ( Zend\Config\Config $phystrixConfig ) | ||
$phystrixConfig | Zend\Config\Config |
protected processExecutionEvent ( string $eventName ) | ||
$eventName | string |
public setCircuitBreakerFactory ( Odesk\Phystrix\CircuitBreakerFactory $circuitBreakerFactory ) | ||
$circuitBreakerFactory | Odesk\Phystrix\CircuitBreakerFactory |
public setCommandMetricsFactory ( Odesk\Phystrix\CommandMetricsFactory $commandMetricsFactory ) | ||
$commandMetricsFactory | Odesk\Phystrix\CommandMetricsFactory |
public setRequestCache ( |
||
$requestCache |
public setRequestLog ( Odesk\Phystrix\RequestLog $requestLog ) | ||
$requestLog | Odesk\Phystrix\RequestLog |
public setServiceLocator ( Zend\Di\LocatorInterface $serviceLocator ) | ||
$serviceLocator | Zend\Di\LocatorInterface |
protected string $commandKey | ||
리턴 | string |
protected Config,Zend\Config $config | ||
리턴 | Zend\Config\Config |