Docs GODI Archive
Projects Blog Link DB

Search GODI:


More options
File lib/ocaml/pkg-lib/cache/cache_client.cmi_pretty GODI Package godi-cache
Library cache
 
   Cache_client.html    cache_client.cmi_pretty    cache_client.mli    Sources  
type key = [ `Hash of Digest.t | `String of string ]
type timestamp = int64
type entry =
  Cache_aux.entry = {
  mutable e_key : Digest.t;
  mutable e_creation : timestamp;
  mutable e_modification : timestamp;
  mutable e_expiration : timestamp;
  mutable e_delete_flag : bool;
  mutable e_value : string;
  mutable e_value_hash : Digest.t;
  mutable e_value_length : int;
  mutable e_counter : int;
  mutable e_bucket : int;
}
type set_options =
  Cache_aux.set_options = {
  mutable opt_overwrite : bool;
  mutable opt_add : bool;
  mutable opt_undelete : bool;
  mutable opt_setifchanged : bool;
}
type get_options =
  Cache_aux.get_options = {
  mutable opt_novalue : bool;
  mutable opt_getifmodifiedsince : timestamp option;
  mutable opt_getifnotmd5 : Digest.t option;
}
type delete_options =
  Cache_aux.delete_options = {
  mutable opt_strictlock : bool;
  mutable opt_delifolderthan : timestamp option;
  mutable opt_delifmd5 : Digest.t option;
  mutable opt_delifnotmd5 : Digest.t option;
}
type config =
  Cache_aux.config = {
  mutable max_size : int64;
  mutable save_cache_period : int;
  mutable save_cache_speed : int;
}
type stats =
  Cache_aux.stats = {
  mutable num_entries : int;
  mutable num_bytes : int64;
  mutable num_calls_get : int;
  mutable num_calls_set : int;
  mutable num_calls_delete : int;
  mutable num_hits : int;
  mutable counters_reset_on : timestamp;
}
type 'a async_reply = (unit -> 'a) -> unit
exception Server_not_alive
class type client_config =
  object
    method buckets : Rpc_client.connector array
    method idle_timeout : float
    method is_alive : int -> bool
    method query_timeout : float
  end
class type async_client =
  object
    method clear : [ `Ok | `Timeout ] async_reply -> unit
    method clear_counters : [ `Ok | `Timeout ] async_reply -> unit
    method client_config : client_config
    method delete :
      [ `Ok | `Timeout ] async_reply ->
      key -> timestamp -> delete_options -> unit
    method get :
      [ `Found of entry | `Not_found | `Timeout ] async_reply ->
      key -> get_options -> unit
    method get_config :
      [ `Ok of (Rpc_client.connector * config) list | `Timeout ] async_reply ->
      unit
    method get_stats :
      [ `Ok of (Rpc_client.connector * stats) list | `Timeout ] async_reply ->
      unit
    method set :
      [ `Not_stored | `Stored | `Timeout ] async_reply ->
      key -> string -> timestamp -> set_options -> unit
    method set_config :
      [ `Ok | `Timeout ] async_reply ->
      (Rpc_client.connector * config) list -> unit
    method shutdown : unit -> unit
  end
class type sync_client =
  object
    method clear : unit -> [ `Ok | `Timeout ]
    method clear_counters : unit -> [ `Ok | `Timeout ]
    method client_config : client_config
    method delete : key -> int64 -> delete_options -> [ `Ok | `Timeout ]
    method get :
      key -> get_options -> [ `Found of entry | `Not_found | `Timeout ]
    method get_config :
      unit -> [ `Ok of (Rpc_client.connector * config) list | `Timeout ]
    method get_stats :
      unit -> [ `Ok of (Rpc_client.connector * stats) list | `Timeout ]
    method set :
      key ->
      string -> int64 -> set_options -> [ `Not_stored | `Stored | `Timeout ]
    method set_config :
      (Rpc_client.connector * config) list -> [ `Ok | `Timeout ]
    method shutdown : unit -> unit
  end
val create_async_client :
  client_config -> Unixqueue.event_system -> async_client
val create_sync_client : client_config -> sync_client
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml