Plasma GitLab Archive
Projects Blog Knowledge

Class type Cache_client.client_config


class type client_config = object .. end
Configures the RPC client.

method buckets : Rpc_client.connector array
For every bucket i=0..n-1 the array element buckets.(i) contains the address of the server storing this bucket. It is allowed to use the same server for several buckets.

This array must be non-empty. If you only use one bucket/one server just return a one-element array.

method is_alive : int -> bool
Before a connection to an RPC server is used, this function is called with the bucket index i. If it returns true the server is assumed to be alive. Otherwise, the exception Server_not_alive is raised immediately. This feature is useful for checking the liveliness of servers proactively, e.g. by pinging them in regular intervals.

If this feature is not needed, just return true for every i

Implementation restriction: works only for the RPC calls get, set, delete, but not for the configuration and statistics calls.

method query_timeout : float
After this number of seconds the queries time out and reply `Timeout. (-1.0) disabled this feature.
method idle_timeout : float
After this number of seconds idle TCP connections are closed
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml