ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMemcacheServer Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 isActive ()
 
 isReachable ()
 
 getId ()
 
 setId (int $id)
 
 getStatus ()
 
 setStatus (int $status)
 
 getHost ()
 
 setHost (string $host)
 
 getPort ()
 
 setPort (int $port)
 
 getFlushNeeded ()
 
 setFlushNeeded (string $flush_needed)
 
 getWeight ()
 
 setWeight (int $weight)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy (int $new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 Return the Name of your Database Table More...
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField (string $old_name, string $new_name)
 
static tableExists ()
 
static fieldExists (string $field_name)
 
static removeDBField (string $field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 never use in ILIAS Core, Plugins only More...
 
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, array $fields=array(' *'), string $operator='=', $both_external=false)
 
static innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static orderBy ($orderBy, string $orderDirection='ASC')
 
static dateFormat (string $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 (bool $set_raw=true)
 
static getArray (?string $key=null, $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Data Fields

const STATUS_INACTIVE = 0
 
const STATUS_ACTIVE = 1
 

Protected Attributes

int $id = 0
 true true true integer 8 true More...
 
int $status = self::STATUS_INACTIVE
 
string $host = ''
 true text 256 More...
 
int $port = 0
 true integer 8 More...
 
int $weight = 100
 true integer 2 More...
 
 $flush_needed = false
 
- Protected Attributes inherited from ActiveRecord
bool $ar_safe_read = true
 
string $connector_container_name = ''
 
bool $is_new = true
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 Returns an instance of the instatiated calling active record (needs to be done in static methods) : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 24 of file class.ilMemcacheServer.php.

Member Function Documentation

◆ getFlushNeeded()

ilMemcacheServer::getFlushNeeded ( )

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

References $flush_needed.

142  : string
143  {
144  return $this->flush_needed;
145  }

◆ getHost()

ilMemcacheServer::getHost ( )

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

References $host.

Referenced by isReachable().

122  : string
123  {
124  return $this->host;
125  }
string $host
true text 256
+ Here is the caller graph for this function:

◆ getId()

ilMemcacheServer::getId ( )

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

References $id.

102  : int
103  {
104  return $this->id;
105  }
int $id
true true true integer 8 true

◆ getPort()

ilMemcacheServer::getPort ( )

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

References $port.

Referenced by isReachable().

132  : int
133  {
134  return $this->port;
135  }
int $port
true integer 8
+ Here is the caller graph for this function:

◆ getStatus()

ilMemcacheServer::getStatus ( )

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

References $status.

Referenced by isActive().

112  : int
113  {
114  return $this->status;
115  }
+ Here is the caller graph for this function:

◆ getWeight()

ilMemcacheServer::getWeight ( )

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

References $weight.

Referenced by isReachable().

152  : int
153  {
154  return $this->weight;
155  }
int $weight
true integer 2
+ Here is the caller graph for this function:

◆ isActive()

ilMemcacheServer::isActive ( )

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

References getStatus().

44  : bool
45  {
46  return $this->getStatus() === self::STATUS_ACTIVE;
47  }
+ Here is the call graph for this function:

◆ isReachable()

ilMemcacheServer::isReachable ( )

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

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

49  : bool
50  {
51  $mem = new Memcached();
52  $mem->resetServerList();
53  $mem->addServer($this->getHost(), $this->getPort(), $this->getWeight());
54 
55  $stats = $mem->getStats();
56 
57  return $stats[$this->getHost() . ':' . $this->getPort()]['pid'] > 0;
58  }
+ Here is the call graph for this function:

◆ returnDbTableName()

static ilMemcacheServer::returnDbTableName ( )
static

Return the Name of your Database Table

Deprecated:

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

39  : string
40  {
41  return 'il_gc_memcache_server';
42  }

◆ setFlushNeeded()

ilMemcacheServer::setFlushNeeded ( string  $flush_needed)

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

References $flush_needed.

147  : void
148  {
149  $this->flush_needed = $flush_needed;
150  }

◆ setHost()

ilMemcacheServer::setHost ( string  $host)

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

References $host.

127  : void
128  {
129  $this->host = $host;
130  }
string $host
true text 256

◆ setId()

ilMemcacheServer::setId ( int  $id)

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

References $id.

107  : void
108  {
109  $this->id = $id;
110  }
int $id
true true true integer 8 true

◆ setPort()

ilMemcacheServer::setPort ( int  $port)

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

References $port.

137  : void
138  {
139  $this->port = $port;
140  }
int $port
true integer 8

◆ setStatus()

ilMemcacheServer::setStatus ( int  $status)

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

References $status.

117  : void
118  {
119  $this->status = $status;
120  }

◆ setWeight()

ilMemcacheServer::setWeight ( int  $weight)

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

References $weight.

157  : void
158  {
159  $this->weight = $weight;
160  }
int $weight
true integer 2

Field Documentation

◆ $flush_needed

ilMemcacheServer::$flush_needed = false
protected

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

Referenced by getFlushNeeded(), and setFlushNeeded().

◆ $host

string ilMemcacheServer::$host = ''
protected

true text 256

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

Referenced by getHost(), and setHost().

◆ $id

int ilMemcacheServer::$id = 0
protected

true true true integer 8 true

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

Referenced by getId(), and setId().

◆ $port

int ilMemcacheServer::$port = 0
protected

true integer 8

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

Referenced by getPort(), and setPort().

◆ $status

int ilMemcacheServer::$status = self::STATUS_INACTIVE
protected

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

Referenced by getStatus(), and setStatus().

◆ $weight

int ilMemcacheServer::$weight = 100
protected

true integer 2

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

Referenced by getWeight(), and setWeight().

◆ STATUS_ACTIVE

◆ STATUS_INACTIVE


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