~piotr-sikora/libmemcached/fix-tests-on-openbsd

« back to all changes in this revision

Viewing changes to docs/man/memcached_callback_get.3

  • Committer: Brian Aker
  • Date: 2011-05-24 20:43:14 UTC
  • mfrom: (929.1.110 libmemcached-build)
  • Revision ID: brian@tangent.org-20110524204314-9ag1kkk4c1a6b3z3
Merge in local trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "MEMCACHED_CALLBACK_GET" "3" "April 14, 2011" "0.47" "libmemcached"
 
1
.TH "MEMCACHED_CALLBACK_GET" "3" "May 23, 2011" "0.47" "libmemcached"
2
2
.SH NAME
3
3
memcached_callback_get \- libmemcached Documentation
4
4
.
32
32
.
33
33
.sp
34
34
Get and set a callback
35
 
.SH LIBRARY
36
 
.sp
37
 
C Client Library for memcached (libmemcached, \-lmemcached)
38
35
.SH SYNOPSIS
39
36
.sp
40
37
#include <libmemcached/memcached.h>
46
43
.TP
47
44
.B void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
48
45
.UNINDENT
 
46
.sp
 
47
Compile and link with \-lmemcached
49
48
.SH DESCRIPTION
50
49
.sp
51
50
libmemcached(3) can have callbacks set key execution points. These either
58
57
memcached_callback_set() changes the function/structure assigned by a
59
58
callback flag. No connections are reset.
60
59
.sp
61
 
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
62
 
of the callbacks
 
60
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any of the callbacks.
63
61
.INDENT 0.0
64
62
.TP
65
63
.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
66
 
.
67
 
When memcached_delete() is called this function will be excuted. At the
68
 
point of its execution all connections have been closed.
69
64
.UNINDENT
 
65
.sp
 
66
When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
70
67
.INDENT 0.0
71
68
.TP
72
69
.B MEMCACHED_CALLBACK_CLONE_FUNCTION
73
 
.
 
70
.UNINDENT
 
71
.sp
74
72
When memcached_delete() is called this function will be excuted. At the
75
 
point of its execution all connections have been closed.
76
 
.UNINDENT
 
73
point of its execution all connections are closed.
77
74
.INDENT 0.0
78
75
.TP
79
76
.B MEMCACHED_CALLBACK_PREFIX_KEY
80
 
.
 
77
.UNINDENT
 
78
.sp
81
79
You can set a value which will be used to create a domain for your keys.
82
 
The value specified here will be prefixed to each of your keys. The value can not
83
 
be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by
84
 
the value of your key. The prefix key is only applied to the primary key,
85
 
not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
86
 
of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
 
80
The value specified here will be prefixed to each of your keys. The value can not be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by the value of your key.
 
81
.sp
 
82
The prefix key is only applied to the primary key, not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case of a key which is too long, MEMCACHED_BAD_KEY_PROVIDED will be returned.
87
83
.sp
88
84
If you set a value with the value being NULL then the prefix key is disabled.
89
 
.UNINDENT
90
85
.INDENT 0.0
91
86
.TP
92
87
.B MEMCACHED_CALLBACK_USER_DATA
93
 
.
 
88
.UNINDENT
 
89
.sp
94
90
This allows you to store a pointer to a specifc piece of data. This can be
95
91
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
96
92
will copy the pointer to the clone.
97
 
.UNINDENT
98
93
.INDENT 0.0
99
94
.TP
100
95
.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
101
 
.
 
96
.UNINDENT
 
97
.sp
102
98
DEPRECATED: use memcached_set_memory_allocators instead.
103
 
.UNINDENT
104
99
.INDENT 0.0
105
100
.TP
106
101
.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
107
 
.
 
102
.UNINDENT
 
103
.sp
108
104
DEPRECATED: use memcached_set_memory_allocators instead.
109
 
.UNINDENT
110
105
.INDENT 0.0
111
106
.TP
112
107
.B MEMCACHED_CALLBACK_FREE_FUNCTION
113
 
.
 
108
.UNINDENT
 
109
.sp
114
110
DEPRECATED: use memcached_set_memory_allocators instead.
115
 
.UNINDENT
116
111
.INDENT 0.0
117
112
.TP
118
113
.B MEMCACHED_CALLBACK_GET_FAILURE
119
 
.
 
114
.UNINDENT
 
115
.sp
120
116
This function implements the read through cache behavior. On failure of retrieval this callback will be called.
121
 
You are responsible for populating the result object provided. This result object will then be stored in the server and
122
 
returned to the calling process. You must clone the memcached_st in order to
 
117
.sp
 
118
You are responsible for populating the result object provided. This result object will then be stored in the server and returned to the calling process.
 
119
.sp
 
120
You must clone the memcached_st in order to
123
121
make use of it. The value will be stored only if you return
124
122
MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
125
123
cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
126
124
.sp
127
125
The prototype for this is:
128
126
memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
129
 
.UNINDENT
130
127
.INDENT 0.0
131
128
.TP
132
129
.B MEMCACHED_CALLBACK_DELETE_TRIGGER