TransactionController
in package
Description of TransactionController
Tags
Table of Contents
Constants
Properties
Methods
- __construct() : mixed
- __destruct() : mixed
- handleRequests() : void
- loadConfig() : void
- registerTransaction() : int
- Registers a new transaction by connecting to the transaction controller daemon
- stop() : void
- commitTransaction() : void
- Commits a transaction, e.g. saves metadata history changes.
- getSocketConfig() : array<string|int, mixed>
- handleRequest() : void
- logState() : void
- makeState() : object
- rollbackTransaction() : void
- Rolls back a transaction by: - finding all resources visible for the $currState assigned to the transaction $txId - bringing their state back to the one visible for the $preTxState
Constants
TYPE_INET
public
mixed
TYPE_INET
= 'inet'
TYPE_UNIX
public
mixed
TYPE_UNIX
= 'unix'
Properties
$child
private
bool
$child
= false
$config
private
Config
$config
$configFile
private
string
$configFile
$log
private
Log
$log
$loop
private
bool
$loop
= true
$socket
private
Socket
$socket
Methods
__construct()
public
__construct(string $configFile) : mixed
Parameters
- $configFile : string
__destruct()
public
__destruct() : mixed
handleRequests()
public
handleRequests() : void
loadConfig()
public
loadConfig() : void
registerTransaction()
Registers a new transaction by connecting to the transaction controller daemon
public
static registerTransaction(Config $config) : int
Parameters
- $config : Config
Tags
Return values
intstop()
public
stop() : void
commitTransaction()
Commits a transaction, e.g. saves metadata history changes.
private
commitTransaction(int $txId, PDO $curState, PDO $prevState) : void
Parameters
- $txId : int
- $curState : PDO
- $prevState : PDO
getSocketConfig()
private
static getSocketConfig(Config $config) : array<string|int, mixed>
Parameters
- $config : Config
Tags
Return values
array<string|int, mixed>handleRequest()
private
handleRequest(Socket $connSocket) : void
Parameters
- $connSocket : Socket
logState()
private
logState(int $txId, object $state) : void
Parameters
- $txId : int
- $state : object
makeState()
private
makeState(string $state[, int|null $delay = null ][, int|null $lockedResCount = null ]) : object
Parameters
- $state : string
- $delay : int|null = null
- $lockedResCount : int|null = null
Return values
objectrollbackTransaction()
Rolls back a transaction by: - finding all resources visible for the $currState assigned to the transaction $txId - bringing their state back to the one visible for the $preTxState
private
rollbackTransaction(int $txId, PDO $curState, PDO $prevState) : void
Parameters
- $txId : int
- $curState : PDO
- $prevState : PDO