Caffe2 - C++ API
A deep learning, cross platform ML framework
file_store_handler.h
1 
17 #pragma once
18 
19 #include <caffe2/distributed/store_handler.h>
20 
21 namespace caffe2 {
22 
24  public:
25  explicit FileStoreHandler(const std::string& path, const std::string& prefix);
26  virtual ~FileStoreHandler();
27 
28  virtual void set(const std::string& name, const std::string& data) override;
29 
30  virtual std::string get(const std::string& name) override;
31 
32  virtual int64_t add(const std::string& name, int64_t value) override;
33 
34  virtual bool check(const std::vector<std::string>& names) override;
35 
36  virtual void wait(
37  const std::vector<std::string>& names,
38  const std::chrono::milliseconds& timeout = kDefaultTimeout) override;
39 
40  protected:
41  std::string basePath_;
42 
43  std::string realPath(const std::string& path);
44 
45  std::string tmpPath(const std::string& name);
46 
47  std::string objectPath(const std::string& name);
48 };
49 
50 } // namespace caffe2
Copyright (c) 2016-present, Facebook, Inc.