com.caucho.quercus.lib
Class Memcache

java.lang.Object
  extended by com.caucho.quercus.lib.Memcache

public class Memcache
extends java.lang.Object

memcache object oriented API facade


Constructor Summary
Memcache()
           
 
Method Summary
 boolean addServer(Env env, java.lang.String host, int port, boolean persistent, int weight, int timeout, int retryInterval)
          Adds a server.
 boolean close()
          Closes the connection.
 boolean connect(Env env, java.lang.String host, int port, int timeout)
          Connect to a server.
 boolean delete(Env env, java.lang.String key, int timeout)
           
 boolean flush(Env env)
           
 Value get(Env env, Value keys)
          Returns a value.
 java.lang.String getVersion()
          Returns version information.
 boolean pconnect(Env env, java.lang.String host, int port, int timeout)
          Connect to a server.
 boolean set(Env env, java.lang.String key, Value value, int flag, int expire)
          Sets a value.
 boolean setCompressThreshold(int threshold, double minSavings)
          Sets the compression threshold
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Memcache

public Memcache()
Method Detail

addServer

public boolean addServer(Env env,
                         java.lang.String host,
                         int port,
                         boolean persistent,
                         int weight,
                         int timeout,
                         int retryInterval)
Adds a server.


connect

public boolean connect(Env env,
                       java.lang.String host,
                       int port,
                       int timeout)
Connect to a server.


get

public Value get(Env env,
                 Value keys)
Returns a value.


delete

public boolean delete(Env env,
                      java.lang.String key,
                      int timeout)

flush

public boolean flush(Env env)

getVersion

public java.lang.String getVersion()
Returns version information.


pconnect

public boolean pconnect(Env env,
                        java.lang.String host,
                        int port,
                        int timeout)
Connect to a server.


set

public boolean set(Env env,
                   java.lang.String key,
                   Value value,
                   int flag,
                   int expire)
Sets a value.


setCompressThreshold

public boolean setCompressThreshold(int threshold,
                                    double minSavings)
Sets the compression threshold


close

public boolean close()
Closes the connection.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object