Class MemCache::Server
In: lib/active_support/vendor/memcache-client-1.7.4/memcache.rb
Parent: Object

This class represents a memcached server instance.

Methods

alive?   close   connect_to   inspect   mark_dead   new   socket  

Constants

RETRY_DELAY = 30.0   The amount of time to wait before attempting to re-establish a connection with a server that is marked dead.

Attributes

host  [R]  The host the memcached server is running on.
logger  [R] 
port  [R]  The port the memcached server is listening on.
retry  [R]  The time of next retry if the connection is dead.
status  [R]  A text status string describing the state of the server.
weight  [R]  The weight given to the server.

Public Class methods

Create a new MemCache::Server object for the memcached instance listening on the given host and port, weighted by the given weight.

Public Instance methods

Check whether the server connection is alive. This will cause the socket to attempt to connect if it isn‘t already connected and or if the server was previously marked as down and the retry time has been exceeded.

Close the connection to the memcached server targeted by this object. The server is not considered dead.

Return a string representation of the server object.

Mark the server as dead and close its socket.

Try to connect to the memcached server targeted by this object. Returns the connected socket object on success or nil on failure.

[Validate]