29#include <unordered_map> 
   38      auto seed = std::hash<uint64_t>{}(oid.
lo);
 
   39      seed ^= std::hash<uint64_t>{}(oid.
hi) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
 
   47   return (lhs.
lo == rhs.
lo) && (lhs.
hi == rhs.
hi);
 
   59class RDaosFakeObject {
 
   61   std::mutex fMutexStorage;
 
   62   std::unordered_map<std::string, std::string> fStorage;
 
   72   RDaosFakeObject() = 
default;
 
   73   ~RDaosFakeObject() = 
default;
 
   83   std::lock_guard<std::mutex> lock(fMutexStorage);
 
   85   for (
unsigned i = 0; i < nr; i++) {
 
   87      auto data = fStorage.find(GetKey(dkey, &iods[i].iod_name));
 
   88      if (
data == fStorage.end())
 
   96      if (sgls[i].sg_nr != 1)
 
  101                  reinterpret_cast<char *
>(iov.
iov_buf));
 
  110   std::lock_guard<std::mutex> lock(fMutexStorage);
 
  112   for (
unsigned i = 0; i < nr; i++) {
 
  113      auto &
data = fStorage[GetKey(dkey, &iods[i].iod_name)];
 
  118      if (sgls[i].sg_nr != 1)
 
  133class RDaosFakeContainer {
 
  135   std::mutex fMutexObjects;
 
  136   std::unordered_map<daos_obj_id_t, std::unique_ptr<RDaosFakeObject>> fObjects;
 
  139   RDaosFakeContainer() = 
default;
 
  140   ~RDaosFakeContainer() = 
default;
 
  144      std::lock_guard<std::mutex> lock(fMutexObjects);
 
  145      auto &obj = fObjects[oid];
 
  147         obj = std::make_unique<RDaosFakeObject>();
 
  160   static std::mutex fMutexPools;
 
  161   static std::unordered_map<label_t, std::unique_ptr<RDaosFakePool>> fPools;
 
  163   std::mutex fMutexContainers;
 
  164   std::unordered_map<label_t, std::unique_ptr<RDaosFakeContainer>> fContainers;
 
  169   static RDaosFakePool *GetPool(
const label_t &label)
 
  171      std::lock_guard<std::mutex> lock(fMutexPools);
 
  172      auto &pool = fPools[label];
 
  174         pool = std::make_unique<RDaosFakePool>();
 
  178   RDaosFakePool() = 
default;
 
  179   ~RDaosFakePool() = 
default;
 
  181   void CreateContainer(
const label_t &label)
 
  183      std::lock_guard<std::mutex> lock(fMutexContainers);
 
  184      fContainers.emplace(label, std::make_unique<RDaosFakeContainer>());
 
  187   RDaosFakeContainer *GetContainer(
const label_t &label)
 
  189      std::lock_guard<std::mutex> lock(fMutexContainers);
 
  190      auto it = fContainers.find(label);
 
  191      return (it != fContainers.end()) ? it->second.get() : 
nullptr;
 
  195std::mutex RDaosFakePool::fMutexPools;
 
  196std::unordered_map<label_t, std::unique_ptr<RDaosFakePool>> RDaosFakePool::fPools;
 
  213      Cookie(
void *
p) : fPointer(
p) {}
 
  214      ~Cookie() { fPointer = 
nullptr; }
 
  215      void *GetPointer() { 
return fPointer; }
 
  221   template <
typename T>
 
  227   template <
typename T>
 
  228   static inline typename std::add_pointer<T>::type ToPointer(
const daos_handle_t h)
 
  230      return reinterpret_cast<typename std::add_pointer<T>::type
>(
reinterpret_cast<Cookie *
>(
h.cookie)->GetPointer());
 
  233   static inline void Invalidate(
daos_handle_t h) { 
delete reinterpret_cast<Cookie *
>(
h.cookie); }
 
  252   return rc ? 
"DER_INVAL" : 
"Success";
 
  257   if (strcmp(
name, 
"SX") == 0)
 
  259   if (strcmp(
name, 
"RP_XSF") == 0)
 
  271      strcpy(
name, 
"RP_XSF"); 
 
  282   auto pool = RDaosHandle::ToPointer<RDaosFakePool>(poh);
 
  289   pool->CreateContainer(
label_t(label));
 
  296   auto pool = RDaosHandle::ToPointer<RDaosFakePool>(poh);
 
  303   auto cont = pool->GetContainer(
label_t(label));
 
  306   *coh = RDaosHandle::ToHandle(cont);
 
  312   RDaosHandle::Invalidate(coh);
 
  360   auto cont = RDaosHandle::ToPointer<RDaosFakeContainer>(coh);
 
  363   auto obj = cont->GetObject(oid, 
mode);
 
  364   *oh = RDaosHandle::ToHandle(obj);
 
  370   RDaosHandle::Invalidate(oh);
 
  400   auto obj = RDaosHandle::ToPointer<RDaosFakeObject>(oh);
 
  403   return obj->Fetch(dkey, nr, iods, sgls);
 
  409   auto obj = RDaosHandle::ToPointer<RDaosFakeObject>(oh);
 
  412   return obj->Update(dkey, nr, iods, sgls);
 
  421   *poh = RDaosHandle::ToHandle(RDaosFakePool::GetPool(
label_t(label)));
 
  427   RDaosHandle::Invalidate(poh);
 
#define R__LOG_WARNING(...)
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char mode
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
TRObject operator()(const T1 &t1) const
 
This file is a reduced version of daos_xxx.h headers that provides (simplified) declarations for use ...
 
@ OC_RP_XSF
Replicated object class which is extremely scalable for fetch.
 
daos_otype_t
DAOS object type.
 
uint16_t daos_oclass_hints_t
 
#define OID_FMT_META_SHIFT
 
static bool daos_label_is_valid(const char *)
 
uint16_t daos_oclass_id_t
 
#define OID_FMT_INTR_BITS
 
static bool daos_otype_t_is_valid(enum daos_otype_t type)
 
#define OID_FMT_CLASS_SHIFT
 
#define OID_FMT_TYPE_SHIFT
 
int daos_oclass_id2name(daos_oclass_id_t oc_id, char *name)
 
const char * d_errstr(int rc)
 
int daos_cont_create_with_label(daos_handle_t poh, const char *label, daos_prop_t *, uuid_t *, daos_event_t *)
 
int daos_eq_poll(daos_handle_t, int, int64_t, unsigned int nevents, daos_event_t **)
 
int daos_event_init(daos_event_t *, daos_handle_t, daos_event_t *)
 
int daos_oclass_name2id(const char *name)
 
int daos_obj_open(daos_handle_t coh, daos_obj_id_t oid, unsigned int mode, daos_handle_t *oh, daos_event_t *)
 
int daos_pool_connect(const char *label, const char *, unsigned int, daos_handle_t *poh, daos_pool_info_t *, daos_event_t *)
 
int daos_obj_fetch(daos_handle_t oh, daos_handle_t, uint64_t, daos_key_t *dkey, unsigned int nr, daos_iod_t *iods, d_sg_list_t *sgls, daos_iom_t *, daos_event_t *)
 
int daos_event_test(daos_event *, int64_t, bool *flag)
 
int daos_event_fini(daos_event_t *)
 
int daos_eq_create(daos_handle_t *)
 
int daos_obj_generate_oid(daos_handle_t, daos_obj_id_t *oid, enum daos_otype_t type, daos_oclass_id_t cid, daos_oclass_hints_t, uint32_t)
 
int daos_event_parent_barrier(daos_event_t *)
 
int daos_cont_open(daos_handle_t poh, const char *label, unsigned int, daos_handle_t *coh, daos_cont_info_t *, daos_event_t *)
 
int daos_obj_close(daos_handle_t oh, daos_event_t *)
 
bool operator==(const daos_obj_id_t &lhs, const daos_obj_id_t &rhs)
 
int daos_eq_destroy(daos_handle_t, int)
 
int daos_cont_close(daos_handle_t coh, daos_event_t *)
 
int daos_pool_disconnect(daos_handle_t poh, daos_event_t *)
 
int daos_obj_update(daos_handle_t oh, daos_handle_t, uint64_t, daos_key_t *dkey, unsigned int nr, daos_iod_t *iods, d_sg_list_t *sgls, daos_event_t *)
 
RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
 
Scatter/gather list for memory buffers.
 
Generic handle for various DAOS components like container, object, etc.
 
daos properties, for pool or container