ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMemcacheServer Class Reference

Class ilMemcacheServer. More...

+ Inheritance diagram for ilMemcacheServer:
+ Collaboration diagram for ilMemcacheServer:

Public Member Functions

 isActive ()
 
 isReachable ()
 
 getId ()
 
 setId ($id)
 
 getStatus ()
 
 setStatus ($status)
 
 getHost ()
 
 setHost ($host)
 
 getPort ()
 
 setPort ($port)
 
 getFlushNeeded ()
 
 setFlushNeeded ($flush_needed)
 
 getWeight ()
 
 setWeight ($weight)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Data Fields

const STATUS_INACTIVE = -1
 
const STATUS_ACTIVE = 1
 
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 

Protected Attributes

 $id = 0
 
 $status = self::STATUS_INACTIVE
 
 $host = ''
 
 $port = 0
 
 $weight = 100
 
 $flush_needed = false
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Class ilMemcacheServer.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 10 of file class.ilMemcacheServer.php.

Member Function Documentation

◆ getFlushNeeded()

ilMemcacheServer::getFlushNeeded ( )
Returns
string

Definition at line 178 of file class.ilMemcacheServer.php.

References $flush_needed.

◆ getHost()

ilMemcacheServer::getHost ( )
Returns
string

Definition at line 142 of file class.ilMemcacheServer.php.

143 {
144 return $this->host;
145 }

References $host.

Referenced by isReachable().

+ Here is the caller graph for this function:

◆ getId()

ilMemcacheServer::getId ( )
Returns
int

Definition at line 106 of file class.ilMemcacheServer.php.

107 {
108 return $this->id;
109 }

References $id.

◆ getPort()

ilMemcacheServer::getPort ( )
Returns
int

Definition at line 160 of file class.ilMemcacheServer.php.

161 {
162 return $this->port;
163 }

References $port.

Referenced by isReachable().

+ Here is the caller graph for this function:

◆ getStatus()

ilMemcacheServer::getStatus ( )
Returns
string

Definition at line 124 of file class.ilMemcacheServer.php.

125 {
126 return $this->status;
127 }

References $status.

Referenced by isActive().

+ Here is the caller graph for this function:

◆ getWeight()

ilMemcacheServer::getWeight ( )
Returns
int

Definition at line 196 of file class.ilMemcacheServer.php.

197 {
198 return $this->weight;
199 }

References $weight.

Referenced by isReachable().

+ Here is the caller graph for this function:

◆ isActive()

ilMemcacheServer::isActive ( )
Returns
bool

Definition at line 30 of file class.ilMemcacheServer.php.

References getStatus(), and STATUS_ACTIVE.

+ Here is the call graph for this function:

◆ isReachable()

ilMemcacheServer::isReachable ( )
Returns
bool

Definition at line 39 of file class.ilMemcacheServer.php.

40 {
41 $mem = new Memcached();
42 $mem->resetServerList();
43 $mem->addServer($this->getHost(), $this->getPort(), $this->getWeight());
44 $stats = $mem->getStats();
45
46 return $stats[$this->getHost() . ':' . $this->getPort()]['pid'] > 0;
47 }
$stats

References $stats, getHost(), getPort(), and getWeight().

+ Here is the call graph for this function:

◆ returnDbTableName()

static ilMemcacheServer::returnDbTableName ( )
static
Returns
string @description Return the Name of your Database Table
Deprecated:

Reimplemented from ActiveRecord.

Definition at line 21 of file class.ilMemcacheServer.php.

22 {
23 return 'il_gc_memcache_server';
24 }

◆ setFlushNeeded()

ilMemcacheServer::setFlushNeeded (   $flush_needed)
Parameters
string$flush_needed

Definition at line 187 of file class.ilMemcacheServer.php.

188 {
189 $this->flush_needed = $flush_needed;
190 }

References $flush_needed.

◆ setHost()

ilMemcacheServer::setHost (   $host)
Parameters
string$host

Definition at line 151 of file class.ilMemcacheServer.php.

152 {
153 $this->host = $host;
154 }

References $host.

◆ setId()

ilMemcacheServer::setId (   $id)
Parameters
int$id

Definition at line 115 of file class.ilMemcacheServer.php.

116 {
117 $this->id = $id;
118 }

References $id.

◆ setPort()

ilMemcacheServer::setPort (   $port)
Parameters
int$port

Definition at line 169 of file class.ilMemcacheServer.php.

170 {
171 $this->port = $port;
172 }

References $port.

◆ setStatus()

ilMemcacheServer::setStatus (   $status)
Parameters
string$status

Definition at line 133 of file class.ilMemcacheServer.php.

134 {
135 $this->status = $status;
136 }

References $status.

◆ setWeight()

ilMemcacheServer::setWeight (   $weight)
Parameters
int$weight

Definition at line 205 of file class.ilMemcacheServer.php.

206 {
207 $this->weight = $weight;
208 }

References $weight.

Field Documentation

◆ $flush_needed

ilMemcacheServer::$flush_needed = false
protected

Definition at line 100 of file class.ilMemcacheServer.php.

Referenced by getFlushNeeded(), and setFlushNeeded().

◆ $host

ilMemcacheServer::$host = ''
protected

Definition at line 76 of file class.ilMemcacheServer.php.

Referenced by getHost(), and setHost().

◆ $id

ilMemcacheServer::$id = 0
protected

Definition at line 60 of file class.ilMemcacheServer.php.

Referenced by getId(), and setId().

◆ $port

ilMemcacheServer::$port = 0
protected

Definition at line 84 of file class.ilMemcacheServer.php.

Referenced by getPort(), and setPort().

◆ $status

ilMemcacheServer::$status = self::STATUS_INACTIVE
protected

Definition at line 68 of file class.ilMemcacheServer.php.

Referenced by getStatus(), and setStatus().

◆ $weight

ilMemcacheServer::$weight = 100
protected

Definition at line 92 of file class.ilMemcacheServer.php.

Referenced by getWeight(), and setWeight().

◆ STATUS_ACTIVE

const ilMemcacheServer::STATUS_ACTIVE = 1

◆ STATUS_INACTIVE

const ilMemcacheServer::STATUS_INACTIVE = -1

Definition at line 12 of file class.ilMemcacheServer.php.

Referenced by ilMemcacheServerFormGUI\fillObject().


The documentation for this class was generated from the following file: