X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=kvstore%2Fkvclient.h;fp=kvstore%2Fkvclient.h;h=dfe86d2b603e841cdc7c859d727dde09ec378db8;hb=3c2cbef21a11c4d86952922f4da7b830a91423f9;hp=0000000000000000000000000000000000000000;hpb=db0d4c10ea7abfa2546f73e96784ebf554342977;p=bluesky.git diff --git a/kvstore/kvclient.h b/kvstore/kvclient.h new file mode 100644 index 0000000..dfe86d2 --- /dev/null +++ b/kvstore/kvclient.h @@ -0,0 +1,40 @@ +#ifndef _KVCLIENT_H_ +#define _KVCLIENT_H_ 1 + +#include "kvstore.pb.h" +#include "workqueue.h" +#include "protobufrpc.h" + +using namespace bicker; + +namespace kvstore +{ + class KeyValueClientRouter; + + class KeyValueClient + { + public: + KeyValueClient(const string& host, + const string& port); + + KeyValueClient(const list &hosts); + + bool Put(const string& key, + const string& value); + + bool Put(const string& key, + const string& value, + TaskNotification &tn); + + bool Get(const string& key, string* value); + + bool Get(const string& key, + string* value, + TaskNotification &tn); + + private: + shared_ptr _router; + }; +} // namespace kvstore + +#endif