Documentation

TransactionController
in package

Description of TransactionController

Tags
author

zozlak

Table of Contents

Constants

TYPE_INET  = 'inet'
TYPE_UNIX  = 'unix'

Properties

$child  : bool
$config  : Config
$configFile  : string
$log  : Log
$loop  : bool
$socket  : Socket

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

Properties

Methods

__construct()

public __construct(string $configFile) : mixed
Parameters
$configFile : string

registerTransaction()

Registers a new transaction by connecting to the transaction controller daemon

public static registerTransaction(Config $config) : int
Parameters
$config : Config
Tags
throws
RepoException
Return values
int

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

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
object

rollbackTransaction()

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

        
On this page

Search results