PHP Интерфейс Kraken\Runtime\Container\ProcessManagerInterface

Наследование: extends Kraken\Runtime\Container\AbstractManagerInterface
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
createProcess ( string $alias, string $name, integer $flags = Runtime::CREATE_DEFAULT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Create a new process container.
createProcesses ( string[][] $definitions, integer $flags = Runtime::CREATE_DEFAULT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Create multiple process containers at once.
destroyProcess ( string $alias, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Destroy existing container.
destroyProcesses ( string[] $aliases, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Destroy multiple process containers at once.
existsProcess ( string $alias ) : boolean Check if process container exists.
flushProcesses ( integer $flags = Runtime::DESTROY_KEEP ) : Kraken\Promise\PromiseInterface Flush processes without destroying them.
getProcesses ( ) : Kraken\Promise\PromiseInterface Get list of existing process containers.
startProcess ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Start existing process container.
startProcesses ( $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Start multiple process containers at once.
stopProcess ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Stop existing process container.
stopProcesses ( $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Stop multiple process containers at once.

Описание методов

createProcess() публичный Метод

Flags might be one of: Runtime::CREATE_DEFAULT - creates a new process only if it does not already exist Runtime::CREATE_FORCE_SOFT - does the same as CREATE_DEFAULT, but in case of existing process tries to replace it. Replacement is done by destroying existing process by sending shutdown message. Runtime::CREATE_FORCE_HARD - does the same as CREATE_DEFAULT, but in case of existing process tries to replace it. Replacement is done by forcefully destroying existing process. Runtime::CREATE_FORCE - creates a new process if it does not exist or tries to replace existing firstly trying to destroy it gracefully, but it fails doing it forcefully.
public createProcess ( string $alias, string $name, integer $flags = Runtime::CREATE_DEFAULT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$name string
$flags integer
$params mixed[]
Результат Kraken\Promise\PromiseInterface

createProcesses() публичный Метод

Create multiple process containers at once.
См. также: ProcessManagerInterface::createProcesses
public createProcesses ( string[][] $definitions, integer $flags = Runtime::CREATE_DEFAULT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$definitions string[][]
$flags integer
$params mixed[]
Результат Kraken\Promise\PromiseInterface

destroyProcess() публичный Метод

Flags might be one of: Runtime::DESTROY_KEEP - sets manager to not destroy runtime Runtime::DESTROY_FORCE_SOFT - destroys runtime by sending message to shutdown Runtime::DESTROY_FORCE_HARD - destroys runtime forcefully and immediately Runtime::DESTROY_FORCE - first, tries to gracefully destroy runtime by sending message to shutdown, if it does not receive answer, then closes it forcefully.
public destroyProcess ( string $alias, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$flags integer
$params mixed[]
Результат Kraken\Promise\PromiseInterface

destroyProcesses() публичный Метод

Destroy multiple process containers at once.
См. также: ProcessManagerInterface::destroyProcesses
public destroyProcesses ( string[] $aliases, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases string[]
$flags integer
$params mixed[]
Результат Kraken\Promise\PromiseInterface

existsProcess() публичный Метод

Check if process container exists.
public existsProcess ( string $alias ) : boolean
$alias string
Результат boolean

flushProcesses() публичный Метод

Flush processes without destroying them.
public flushProcesses ( integer $flags = Runtime::DESTROY_KEEP ) : Kraken\Promise\PromiseInterface
$flags integer
Результат Kraken\Promise\PromiseInterface

getProcesses() публичный Метод

Get list of existing process containers.
public getProcesses ( ) : Kraken\Promise\PromiseInterface
Результат Kraken\Promise\PromiseInterface

startProcess() публичный Метод

Start existing process container.
public startProcess ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$params mixed[]
Результат Kraken\Promise\PromiseInterface

startProcesses() публичный Метод

Start multiple process containers at once.
public startProcesses ( $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases
$params mixed[]
Результат Kraken\Promise\PromiseInterface

stopProcess() публичный Метод

Stop existing process container.
public stopProcess ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$params mixed[]
Результат Kraken\Promise\PromiseInterface

stopProcesses() публичный Метод

Stop multiple process containers at once.
public stopProcesses ( $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases
$params mixed[]
Результат Kraken\Promise\PromiseInterface