Skip to content

Latest commit

 

History

History
321 lines (150 loc) · 4.32 KB

MemcachedResourceManager.rst

File metadata and controls

321 lines (150 loc) · 4.32 KB

Class

Zend\Cache\Storage\Adapter\MemcachedResourceManager

This is a resource manager for memcached

Methods

hasResource

hasResource()

Check if a resource exists

param string
rtype

boolean

getResource

getResource()

Gets a memcached resource

param string
rtype

MemcachedResource

throws

ExceptionRuntimeException

setResource

setResource()

Set a resource

param string
param arrayMemcachedResource
rtype

MemcachedResourceManager Fluent interface

removeResource

removeResource()

Remove a resource

param string
rtype

MemcachedResourceManager Fluent interface

setPersistentId

setPersistentId()

Set the persistent id

param string
param string
rtype

MemcachedResourceManager Fluent interface

throws

ExceptionRuntimeException

getPersistentId

getPersistentId()

Get the persistent id

param string
rtype

string

throws

ExceptionRuntimeException

normalizePersistentId

normalizePersistentId()

Normalize the persistent id

param string

setLibOptions

setLibOptions()

Set Libmemcached options

param string
param array
rtype

MemcachedResourceManager Fluent interface

getLibOptions

getLibOptions()

Get Libmemcached options

param string
rtype

array

throws

ExceptionRuntimeException

setLibOption

setLibOption()

Set one Libmemcached option

param string
param string|int
param mixed
rtype

MemcachedResourceManager Fluent interface

getLibOption

getLibOption()

Get one Libmemcached option

param string
param string|int
rtype

mixed

throws

ExceptionRuntimeException

normalizeLibOptions

normalizeLibOptions()

Normalize libmemcached options

param array|Traversable
throws ExceptionInvalidArgumentException

normalizeLibOptionKey

normalizeLibOptionKey()

Convert option name into it's constant value

param string|int
throws ExceptionInvalidArgumentException

setServers

setServers()

Set servers

$servers can be an array list or a comma separated list of servers. One server in the list can be descripted as follows: - URI: [tcp://]<host>[:<port>][?weight=<weight>] - Assoc: array('host' => <host>[, 'port' => <port>][, 'weight' => <weight>]) - List: array(<host>[, <port>][, <weight>])

param string
param string|array
rtype

MemcachedResourceManager

getServers

getServers()

Get servers

param string
throws ExceptionRuntimeException
rtype

array array('host' => <host>, 'port' => <port>, 'weight' => <weight>)

addServers

addServers()

Add servers

param string
param string|array
rtype

MemcachedResourceManager

addServer

addServer()

Add one server

param string
param string|array
rtype

MemcachedResourceManager

normalizeServers

normalizeServers()

Normalize a list of servers into the following format: array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, ...])

param string|array

normalizeServer

normalizeServer()

Normalize one server into the following format: array('host' => <host>, 'port' => <port>, 'weight' => <weight>)

param string|array
throws ExceptionInvalidArgumentException

compareServers

compareServers()

Compare 2 normalized server arrays (Compares only the host and the port)

param array
param array
rtype

int