class type async_client = object .. end
Client access to cache by asynchronous RPC calls
method client_config : client_config
The configuration of this client
method set : [ `Not_stored | `Stored | `Timeout ] async_reply ->
key ->
string -> timestamp -> set_options -> unit
set r k v t_exp opts: Tries to set key k to value v with
expiration timestamp t_opt. The options opts determine which
kind of set operation is allowed. The result can be `Stored
meaning a successful modification, `Not_stored meaning the
refusal of a modification, or `Timeout meaning a timeout
contacting the server. When the result is available, the
function r is called back.
method get : [ `Found of entry | `Not_found | `Timeout ]
async_reply ->
key -> get_options -> unit
get r k opts: Tries to get the entry for key k. The options
opts determine which entries can be retrieved in this way.
The result can be `Found e with the entry e, `Not_found
if the key cannot be located or the options prevent the entry
from being returned, or `Timeout if the server is not reachable.
When the result is available, the
function r is called back.
method delete : [ `Ok | `Timeout ] async_reply ->
key ->
timestamp -> delete_options -> unit
delete r k t_del opts: Tries to move the entry for key k from
the regular store to the delete queue where it is marked as being
scheduled for deletion at time t_del. If t_del is in the past,
the deletion is conducted immediately. If the entry does not
qualify for deletion because of a failed requirement in opts,
it is silently not moved to the delete queue, without telling the
caller. The result is `Ok meaning the server could be contacted,
or `Timeout meaning a timeout happened.
When the result is available, the
function r is called back.
method clear : [ `Ok | `Timeout ] async_reply -> unit
clear r: Delete all entries. The result is `Ok meaning the
deletion was successful, or `Timeout meaning a timeout happened.
When the result is available, the
function r is called back.
method get_config : [ `Ok of (Rpc_client.connector * config) list | `Timeout ]
async_reply -> unit
get_config r: Return the connector and the server config for
all servers as list l. The connector may serve as identifier
for the server. The result is `Ok l meaning the
config of all servers could be retrieved, or `Timeout meaning a
timeout happened for at least one server.
When the result is available, the
function r is called back.
method set_config : [ `Ok | `Timeout ] async_reply ->
(Rpc_client.connector * config) list -> unit
set_config r: Set the server config for the servers identified
by connectors in list l. The result is `Ok l meaning the
config of all named servers could be set, or `Timeout meaning a
timeout happened for at least one server.
When the result is available, the
function r is called back.
method get_stats : [ `Ok of (Rpc_client.connector * stats) list | `Timeout ]
async_reply -> unit
get_stats r: Return the connector and the statistics record for
all servers as list l. The connector may serve as identifier
for the server. The result is `Ok l meaning the
config of all servers could be retrieved, or `Timeout meaning a
timeout happened for at least one server.
When the result is available, the
function r is called back.
method clear_counters : [ `Ok | `Timeout ] async_reply -> unit
clear_counters r: Reset the statistics counters for all servers.
The result is `Ok meaning the counters could be reset on all
servers, or `Timeout meaning a timeout happened for at least one
server.
When the result is available, the
function r is called back.
method shutdown : unit -> unit
Shutdown all network connections. If further RPC calls are requested,
new network connections are opened.