9 #ifndef INCLUDE_FUNAPI_SERVICE_CROSS_SERVER_STORAGE_H_ 10 #define INCLUDE_FUNAPI_SERVICE_CROSS_SERVER_STORAGE_H_ 12 #include <boost/noncopyable.hpp> 32 typedef function<void(const Key &key, Result result)> Callback;
33 typedef function<void(
const Key &key,
34 const Json &data, Result result)> ReadCallback;
37 static void Create(
const Key &key,
const Json &data,
38 const WallClock::Duration &expiration_time,
41 static void Create(
const Json &data,
42 const WallClock::Duration &expiration_time,
45 static void Delete(
const Key &key,
const Callback &cb);
47 static void Read(
const Key &key,
const ReadCallback &cb);
49 static void Write(
const Key &key,
const Json &data,
50 const WallClock::Duration &expiration_time,
53 static void Refresh(
const Key &key,
54 const WallClock::Duration &expiration_time,
58 static Result CreateSync(
const Key &key,
const Json &data,
59 const WallClock::Duration &expiration_time);
61 static Result CreateSync(
const Json &data,
62 const WallClock::Duration &expiration_time,
65 static Result DeleteSync(
const Key &key);
67 static Result ReadSync(
const Key &key,
Json *data);
69 static Result WriteSync(
const Key &key,
const Json &data,
70 const WallClock::Duration &expiration_time);
72 static Result RefreshSync(
const Key &key,
73 const WallClock::Duration &expiration_time);
78 #endif // INCLUDE_FUNAPI_SERVICE_CROSS_SERVER_STORAGE_H_
Definition: cross_server_storage.h:20
boost::uuids::uuid Uuid
UUID type used throughout Funapi.
Definition: types.h:56