TransactionalCommandLockingDecorator
TransactionalCommandLockingDecorator treats commands as transactions. Meaning that any subsequent Commands passed to the bus from inside the relevant CommandHandler will not be executed until the initial command is completed.
- Full name:
\Codefy\CommandBus\Decorators\TransactionalCommandLockingDecorator
- This class implements:
\Codefy\CommandBus\Decorator
Properties
locked
Whether a Command is in progress and the bus is locked.
queue
Queued Commands to be executed when the current command finishes.
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$innerCommandBus | ?\Codefy\CommandBus\CommandBus |
execute
Execute a command
Parameters:
Parameter | Type | Description |
---|---|---|
$command | \Codefy\CommandBus\Command |
executeIgnoringLock
Execute a command, regardless of the lock
Parameters:
Parameter | Type | Description |
---|---|---|
$command | \Codefy\CommandBus\Command |
executeQueue
Execute all queued commands
Inherited methods
setInnerBus
Parameters:
Parameter | Type | Description |
---|---|---|
$bus | \Codefy\CommandBus\CommandBus |
Automatically generated on 2025-10-13