PHP Interface Kraken\Runtime\RuntimeManagerInterface

Inheritance: extends Kraken\Runtime\Container\ProcessManagerInterface, extends Kraken\Runtime\Container\ThreadManagerInterface
显示文件 Open project: kraken-php/framework

Public Methods

Method Description
destroyRuntime ( string $alias, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Destroy existing container.
destroyRuntimes ( string[] $aliases, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[]] $params = [] ) : Kraken\Promise\PromiseInterface Destroy multiple containers at once.
existsRuntime ( string $alias ) : boolean Check if container exists.
flushRuntimes ( integer $flags = Runtime::DESTROY_KEEP ) : Kraken\Promise\PromiseInterface Flush runtimes without destroying them.
getRuntimes ( ) : Kraken\Promise\PromiseInterface Get list of existing containers.
startRuntime ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Start existing container.
startRuntimes ( string[] $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Start multiple containers at once.
stopRuntime ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Stop existing container.
stopRuntimes ( string[] $aliases, string[] $params = [] ) : Kraken\Promise\PromiseInterface Stop multiple containers at once.

Method Details

destroyRuntime() public method

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 destroyRuntime ( string $alias, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$flags integer
$params mixed[]
return Kraken\Promise\PromiseInterface

destroyRuntimes() public method

Destroy multiple containers at once.
See also: RuntimeManagerInterface::destroyRuntimes
public destroyRuntimes ( string[] $aliases, integer $flags = Runtime::DESTROY_FORCE_SOFT, mixed[]] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases string[]
$flags integer
$params mixed[]]
return Kraken\Promise\PromiseInterface

existsRuntime() public method

Check if container exists.
public existsRuntime ( string $alias ) : boolean
$alias string
return boolean

flushRuntimes() public method

Flush runtimes without destroying them.
public flushRuntimes ( integer $flags = Runtime::DESTROY_KEEP ) : Kraken\Promise\PromiseInterface
$flags integer
return Kraken\Promise\PromiseInterface

getRuntimes() public method

Get list of existing containers.
public getRuntimes ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface

startRuntime() public method

Start existing container.
public startRuntime ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$params mixed[]
return Kraken\Promise\PromiseInterface

startRuntimes() public method

Start multiple containers at once.
See also: RuntimeManagerInterface::startRuntimes
public startRuntimes ( string[] $aliases, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases string[]
$params mixed[]
return Kraken\Promise\PromiseInterface

stopRuntime() public method

Stop existing container.
public stopRuntime ( string $alias, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$alias string
$params mixed[]
return Kraken\Promise\PromiseInterface

stopRuntimes() public method

Stop multiple containers at once.
public stopRuntimes ( string[] $aliases, string[] $params = [] ) : Kraken\Promise\PromiseInterface
$aliases string[]
$params string[]
return Kraken\Promise\PromiseInterface