\GlobalDataClient

Global data client.

@version 1.0.3

Summary

Methods
Properties
Constants
__construct()
__set()
__isset()
__unset()
__get()
cas()
add()
increment()
$timeout
$pingInterval
No constants found
getConnection()
writeToRemote()
readFromRemote()
$_globalServers
$_globalConnections
$_cache
N/A
No private methods found
No private properties found
N/A

Properties

$timeout

$timeout : int

Timeout.

Type

int

$pingInterval

$pingInterval : int

Heartbeat interval.

Type

int

$_globalServers

$_globalServers : array

Global data server address.

Type

array

$_globalConnections

$_globalConnections : resource

Connection to global server.

Type

resource

$_cache

$_cache : array

Cache.

Type

array

Methods

__construct()

__construct(mixed  $servers) : mixed

Construct.

Parameters

mixed $servers

Returns

mixed —

__set()

__set(string  $key, mixed  $value) : mixed

Magic methods __set.

Parameters

string $key
mixed $value

Throws

\Exception

Returns

mixed —

__isset()

__isset(string  $key) : mixed

Magic methods __isset.

Parameters

string $key

Returns

mixed —

__unset()

__unset(string  $key) : mixed

Magic methods __unset.

Parameters

string $key

Throws

\Exception

Returns

mixed —

__get()

__get(string  $key) : mixed

Magic methods __get.

Parameters

string $key

Throws

\Exception

Returns

mixed —

cas()

cas(string  $key, mixed  $old_value, mixed  $new_value) : mixed

Cas.

Parameters

string $key
mixed $old_value
mixed $new_value

Throws

\Exception

Returns

mixed —

add()

add(string  $key, mixed  $value) : mixed

Add.

Parameters

string $key
mixed $value

Throws

\Exception

Returns

mixed —

increment()

increment(string  $key, mixed  $step = 1) : mixed

Increment.

Parameters

string $key
mixed $step

Throws

\Exception

Returns

mixed —

getConnection()

getConnection(mixed  $key) : mixed

Connect to global server.

Parameters

mixed $key

Throws

\Exception

Returns

mixed —

writeToRemote()

writeToRemote(mixed  $data, mixed  $connection) : mixed

Write data to global server.

Parameters

mixed $data
mixed $connection

Returns

mixed —

readFromRemote()

readFromRemote(mixed  $connection) : mixed

Read data from global server.

Parameters

mixed $connection

Throws

\GlobalData\Exception

Returns

mixed —