Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 81805 invoked from network); 15 Jun 2009 00:04:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 00:04:01 -0000 Received: (qmail 34229 invoked by uid 500); 15 Jun 2009 00:04:13 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 34162 invoked by uid 500); 15 Jun 2009 00:04:13 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 34153 invoked by uid 99); 15 Jun 2009 00:04:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 00:04:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 00:03:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 80CA12388A32; Mon, 15 Jun 2009 00:02:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r784636 [38/47] - in /apr/site/trunk/docs/docs: apr-util/trunk/ apr/trunk/ Date: Mon, 15 Jun 2009 00:01:47 -0000 To: commits@apr.apache.org From: bojan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090615000205.80CA12388A32@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: apr/site/trunk/docs/docs/apr/trunk/group___a_p_r___util___m_c.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/group___a_p_r___util___m_c.html?rev=784636&view=auto ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/group___a_p_r___util___m_c.html (added) +++ apr/site/trunk/docs/docs/apr/trunk/group___a_p_r___util___m_c.html Mon Jun 15 00:01:38 2009 @@ -0,0 +1,556 @@ + + +Apache Portable Runtime: Memcached Client Routines + + + + + +
+

Memcached Client Routines
+ +[APR Utility Functions] +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  apr_memcache_server_t
struct  apr_memcache_t
struct  apr_memcache_value_t
struct  apr_memcache_stats_t

Typedefs

typedef struct apr_memcache_conn_t apr_memcache_conn_t
typedef struct
+apr_memcache_server_t 
apr_memcache_server_t
+typedef apr_uint32_t(* apr_memcache_hash_func )(void *baton, const char *data, const apr_size_t data_len)
+typedef struct apr_memcache_t apr_memcache_t
+typedef apr_memcache_server_t *(* apr_memcache_server_func )(void *baton, apr_memcache_t *mc, const apr_uint32_t hash)

Enumerations

enum  apr_memcache_server_status_t { APR_MC_SERVER_LIVE, +APR_MC_SERVER_DEAD + }

Functions

 APU_DECLARE (apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc
 APU_DECLARE (apr_memcache_server_t *) apr_memcache_find_server_hash(apr_memcache_t *mc
 apr_memcache_find_server_hash_default (void *baton, apr_memcache_t *mc, const apr_uint32_t hash)
 APU_DECLARE (apr_status_t) apr_memcache_add_server(apr_memcache_t *mc
 apr_memcache_add_multget_key (apr_pool_t *data_pool, const char *key, apr_hash_t **values)
 apr_memcache_multgetp (apr_memcache_t *mc, apr_pool_t *temp_pool, apr_pool_t *data_pool, apr_hash_t *values)

Variables

+const char * data
+const char const apr_size_t data_len
+const apr_uint32_t hash
+apr_memcache_server_tserver
+const char * host
+const char apr_port_t port
+apr_memcache_server_tms
+const char apr_port_t apr_uint32_t min
+const char apr_port_t
+apr_uint32_t apr_uint32_t 
smax
+const char apr_port_t
+apr_uint32_t apr_uint32_t
+apr_uint32_t 
max
+const char apr_port_t
+apr_uint32_t apr_uint32_t
+apr_uint32_t apr_uint32_t 
ttl
+const char apr_port_t
+apr_uint32_t apr_uint32_t
+apr_uint32_t apr_uint32_t
+apr_memcache_server_t ** 
ns
+apr_uint16_t max_servers
+apr_uint16_t apr_uint32_t flags
+apr_uint16_t apr_uint32_t
+apr_memcache_t ** 
mc
+apr_pool_tp
+apr_pool_t const char * key
+apr_pool_t const char char ** baton
+apr_pool_t const char char
+apr_size_t * 
len
+const char char const apr_size_t data_size
+const char char const
+apr_size_t apr_uint32_t 
timeout
+const char apr_int32_t n
+const char apr_int32_t
+apr_uint32_t * 
nv
+const char apr_int32_t
+apr_uint32_t * 
new_value
+apr_pool_t apr_memcache_stats_t ** stats
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct apr_memcache_conn_t apr_memcache_conn_t
+
+
+ +

+Opaque memcache client connection object +

+

+ +

+
+ + + + +
typedef struct apr_memcache_server_t apr_memcache_server_t
+
+
+ +

+Memcache Server Info Object +

+

+


Enumeration Type Documentation

+ +
+ +
+ +

+Specifies the status of a memcached server

Enumerator:
+ + + +
APR_MC_SERVER_LIVE  +Server is alive and responding to requests
APR_MC_SERVER_DEAD  +Server is not responding to requests
+
+ +
+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
apr_memcache_add_multget_key (apr_pool_t data_pool,
const char *  key,
apr_hash_t **  values 
)
+
+
+ +

+Add a key to a hash for a multiget query if the hash (*value) is NULL it will be created

Parameters:
+ + + + +
data_pool pool from where the hash and their items are created from
key null terminated string containing the key
values hash of keys and values that this key will be added to
+
+
Returns:
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
apr_memcache_find_server_hash_default (void *  baton,
apr_memcache_t mc,
const apr_uint32_t  hash 
)
+
+
+ +

+server selection compatible with the standard Perl Client. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
apr_memcache_multgetp (apr_memcache_t mc,
apr_pool_t temp_pool,
apr_pool_t data_pool,
apr_hash_t values 
)
+
+
+ +

+Gets multiple values from the server, allocating the values out of p

Parameters:
+ + + + + +
mc client to use
temp_pool Pool used for tempoary allocations. May be cleared inside this call.
data_pool Pool used to allocate data for the returned values.
values hash of apr_memcache_value_t keyed by strings, contains the result of the multiget call.
+
+
Returns:
+ +
+

+ +

+
+ + + + + + + + + +
APU_DECLARE (apr_status_t   ) 
+
+
+ +

+Adds a server to a client object

Parameters:
+ + + +
mc The memcache client object to use
ms Server to add
+
+
Remarks:
Adding servers is not thread safe, and should be done once at startup.
+
Warning:
Changing servers after startup may cause keys to go to different servers.
+Enables a Server for use again
Parameters:
+ + + +
mc The memcache client object to use
ms Server to Activate
+
+Disable a Server
Parameters:
+ + + +
mc The memcache client object to use
ms Server to Disable
+
+Creates a new Server Object
Parameters:
+ + + + + + + + + +
p Pool to use
host hostname of the server
port port of the server
min minimum number of client sockets to open
smax soft maximum number of client connections to open
max hard maximum number of client connections
ttl time to live in seconds of a client connection
ns location of the new server object
+
+
See also:
apr_reslist_create
+
Remarks:
min, smax, and max are only used when APR_HAS_THREADS
+Creates a new memcached client object
Parameters:
+ + + + + +
p Pool to use
max_servers maximum number of servers
flags Not currently used
mc location of the new memcache client object
+
+Gets a value from the server, allocating the value out of p
Parameters:
+ + + + + + + +
mc client to use
p Pool to use
key null terminated string containing the key
baton location of the allocated value
len length of data at baton
flags any flags set by the client for this key
+
+
Returns:
+Sets a value by key on the server
Parameters:
+ + + + + + + +
mc client to use
key null terminated string containing the key
baton data to store on the server
len length of data at baton
timeout time in seconds for the data to live on the server
flags any flags set by the client for this key
+
+Adds value by key on the server
Parameters:
+ + + + + + + +
mc client to use
key null terminated string containing the key
baton data to store on the server
len length of data at baton
timeout time for the data to live on the server
flags any flags set by the client for this key
+
+
Returns:
APR_SUCCESS if the key was added, APR_EEXIST if the key already exists on the server.
+Replaces value by key on the server
Parameters:
+ + + + + + + +
mc client to use
key null terminated string containing the key
baton data to store on the server
len length of data at baton
timeout time for the data to live on the server
flags any flags set by the client for this key
+
+
Returns:
APR_SUCCESS if the key was added, APR_EEXIST if the key did not exist on the server.
+Deletes a key from a server
Parameters:
+ + + + +
mc client to use
key null terminated string containing the key
timeout time for the delete to stop other clients from adding
+
+Increments a value
Parameters:
+ + + + + +
mc client to use
key null terminated string containing the key
n number to increment by
nv new value after incrmenting
+
+Decrements a value
Parameters:
+ + + + + +
mc client to use
key null terminated string containing the key
n number to decrement by
nv new value after decrementing
+
+Query a server's version
Parameters:
+ + + + + +
ms server to query
p Pool to allocate answer from
baton location to store server version string
len length of the server version string
+
+Query a server for statistics
Parameters:
+ + + + +
ms server to query
p Pool to allocate answer from
stats location of the new statistics structure
+
+ +
+

+ +

+
+ + + + + + + + + +
APU_DECLARE (apr_memcache_server_t  ) 
+
+
+ +

+Picks a server based on a hash

Parameters:
+ + + +
mc The memcache client object to use
hash Hashed value of a Key
+
+
Returns:
server that controls specified hash
+
See also:
apr_memcache_hash
+Finds a Server object based on a hostname/port pair
Parameters:
+ + + + +
mc The memcache client object to use
host Hostname of the server
port Port of the server
+
+
Returns:
Server with matching Hostname and Port, or NULL if none was found.
+ +
+

+ +

+
+ + + + + + + + + +
APU_DECLARE (apr_uint32_t   ) 
+
+
+ +

+Creates a crc32 hash used to split keys between servers

Parameters:
+ + + +
data Data to be hashed
data_len Length of the data to use
+
+
Returns:
crc32 hash of data
+
Remarks:
The crc32 hash is not compatible with old memcached clients.
+Pure CRC32 Hash. Used by some clients.

+hash compatible with the standard Perl Client. +

+

+

+
Generated on Mon Jun 15 09:45:30 2009 for Apache Portable Runtime by  + +doxygen 1.5.8
+ +