Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Detail::RDaosContainer Class Reference

A RDaosContainer provides read/write access to objects in a given container.

Definition at line 157 of file RDaos.hxx.

Classes

struct  ROidDkeyPair
 A pair of <object ID, distribution key> that can be used to issue a fetch/update request for multiple attribute keys. More...
 
struct  RWOperation
 Describes a read/write operation on multiple attribute keys under the same object ID and distribution key, see the ReadV/WriteV functions. More...
 

Public Types

using AttributeKey_t = RDaosObject::AttributeKey_t
 
using DistributionKey_t = RDaosObject::DistributionKey_t
 
using MultiObjectRWOperation_t = std::unordered_map< ROidDkeyPair, RWOperation, ROidDkeyPair::Hash >
 
using ObjClassId_t = RDaosObject::ObjClassId
 

Public Member Functions

 RDaosContainer (std::shared_ptr< RDaosPool > pool, std::string_view containerId, bool create=false)
 
 ~RDaosContainer ()
 
std::string GetContainerUuid ()
 
ObjClassId_t GetDefaultObjectClass () const
 
int ReadSingleAkey (void *buffer, std::size_t length, daos_obj_id_t oid, DistributionKey_t dkey, AttributeKey_t akey)
 
int ReadSingleAkey (void *buffer, std::size_t length, daos_obj_id_t oid, DistributionKey_t dkey, AttributeKey_t akey, ObjClassId_t cid)
 Read data from a single object attribute key to the given buffer.
 
int ReadV (MultiObjectRWOperation_t &map)
 
int ReadV (MultiObjectRWOperation_t &map, ObjClassId_t cid)
 Perform a vector read operation on multiple objects.
 
void SetDefaultObjectClass (const ObjClassId_t cid)
 
int WriteSingleAkey (const void *buffer, std::size_t length, daos_obj_id_t oid, DistributionKey_t dkey, AttributeKey_t akey)
 
int WriteSingleAkey (const void *buffer, std::size_t length, daos_obj_id_t oid, DistributionKey_t dkey, AttributeKey_t akey, ObjClassId_t cid)
 Write the given buffer to a single object attribute key.
 
int WriteV (MultiObjectRWOperation_t &map)
 
int WriteV (MultiObjectRWOperation_t &map, ObjClassId_t cid)
 Perform a vector write operation on multiple objects.
 

Private Member Functions

int VectorReadWrite (MultiObjectRWOperation_t &map, ObjClassId_t cid, int(RDaosObject::*fn)(RDaosObject::FetchUpdateArgs &))
 Perform a vector read/write operation on different objects.
 

Private Attributes

daos_handle_t fContainerHandle {}
 
std::string fContainerLabel {}
 
uuid_t fContainerUuid {}
 
ObjClassId_t fDefaultObjectClass {OC_SX}
 
std::shared_ptr< RDaosPoolfPool
 

Friends

class RDaosObject
 

#include <ROOT/RDaos.hxx>

Member Typedef Documentation

◆ AttributeKey_t

◆ DistributionKey_t

◆ MultiObjectRWOperation_t

◆ ObjClassId_t

Constructor & Destructor Documentation

◆ RDaosContainer()

ROOT::Experimental::Detail::RDaosContainer::RDaosContainer ( std::shared_ptr< RDaosPool pool,
std::string_view  containerId,
bool  create = false 
)

Definition at line 172 of file RDaos.cxx.

◆ ~RDaosContainer()

ROOT::Experimental::Detail::RDaosContainer::~RDaosContainer ( )

Definition at line 196 of file RDaos.cxx.

Member Function Documentation

◆ GetContainerUuid()

std::string ROOT::Experimental::Detail::RDaosContainer::GetContainerUuid ( )

Definition at line 201 of file RDaos.cxx.

◆ GetDefaultObjectClass()

ObjClassId_t ROOT::Experimental::Detail::RDaosContainer::GetDefaultObjectClass ( ) const
inline

Definition at line 256 of file RDaos.hxx.

◆ ReadSingleAkey() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadSingleAkey ( void *  buffer,
std::size_t  length,
daos_obj_id_t  oid,
DistributionKey_t  dkey,
AttributeKey_t  akey 
)
inline

Definition at line 271 of file RDaos.hxx.

◆ ReadSingleAkey() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadSingleAkey ( void *  buffer,
std::size_t  length,
daos_obj_id_t  oid,
DistributionKey_t  dkey,
AttributeKey_t  akey,
ObjClassId_t  cid 
)

Read data from a single object attribute key to the given buffer.

Parameters
bufferThe address of a buffer that has capacity for at least length bytes.
lengthLength of the buffer.
oidA 128-bit DAOS object identifier.
dkeyThe distribution key used for this operation.
akeyThe attribute key used for this operation.
cidAn object class ID.
Returns
0 if the operation succeeded; a negative DAOS error number otherwise.

Definition at line 208 of file RDaos.cxx.

◆ ReadV() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadV ( MultiObjectRWOperation_t map)
inline

Definition at line 298 of file RDaos.hxx.

◆ ReadV() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadV ( MultiObjectRWOperation_t map,
ObjClassId_t  cid 
)
inline

Perform a vector read operation on multiple objects.

Parameters
mapA MultiObjectRWOperation_t that describes read operations to perform.
cidAn object class ID.
Returns
Number of operations that could not complete.

Definition at line 297 of file RDaos.hxx.

◆ SetDefaultObjectClass()

void ROOT::Experimental::Detail::RDaosContainer::SetDefaultObjectClass ( const ObjClassId_t  cid)
inline

Definition at line 257 of file RDaos.hxx.

◆ VectorReadWrite()

int ROOT::Experimental::Detail::RDaosContainer::VectorReadWrite ( MultiObjectRWOperation_t map,
ObjClassId_t  cid,
int(RDaosObject::*)(RDaosObject::FetchUpdateArgs &)  fn 
)
private

Perform a vector read/write operation on different objects.

Parameters
mapA MultiObjectRWOperation_t that describes read/write operations to perform.
cidThe daos_oclass_id_t used to qualify OIDs.
fnEither &RDaosObject::Fetch (read) or &RDaosObject::Update (write).
Returns
0 if the operation succeeded; a negative DAOS error number otherwise.

Definition at line 231 of file RDaos.cxx.

◆ WriteSingleAkey() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteSingleAkey ( const void *  buffer,
std::size_t  length,
daos_obj_id_t  oid,
DistributionKey_t  dkey,
AttributeKey_t  akey 
)
inline

Definition at line 287 of file RDaos.hxx.

◆ WriteSingleAkey() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteSingleAkey ( const void *  buffer,
std::size_t  length,
daos_obj_id_t  oid,
DistributionKey_t  dkey,
AttributeKey_t  akey,
ObjClassId_t  cid 
)

Write the given buffer to a single object attribute key.

Parameters
bufferThe address of the source buffer.
lengthLength of the buffer.
oidA 128-bit DAOS object identifier.
dkeyThe distribution key used for this operation.
akeyThe attribute key used for this operation.
cidAn object class ID.
Returns
0 if the operation succeeded; a negative DAOS error number otherwise.

Definition at line 219 of file RDaos.cxx.

◆ WriteV() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteV ( MultiObjectRWOperation_t map)
inline

Definition at line 310 of file RDaos.hxx.

◆ WriteV() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteV ( MultiObjectRWOperation_t map,
ObjClassId_t  cid 
)
inline

Perform a vector write operation on multiple objects.

Parameters
mapA MultiObjectRWOperation_t that describes write operations to perform.
cidAn object class ID.
Returns
Number of operations that could not complete.

Definition at line 306 of file RDaos.hxx.

Friends And Related Symbol Documentation

◆ RDaosObject

friend class RDaosObject
friend

Definition at line 158 of file RDaos.hxx.

Member Data Documentation

◆ fContainerHandle

daos_handle_t ROOT::Experimental::Detail::RDaosContainer::fContainerHandle {}
private

Definition at line 236 of file RDaos.hxx.

◆ fContainerLabel

std::string ROOT::Experimental::Detail::RDaosContainer::fContainerLabel {}
private

Definition at line 238 of file RDaos.hxx.

◆ fContainerUuid

uuid_t ROOT::Experimental::Detail::RDaosContainer::fContainerUuid {}
private

Definition at line 237 of file RDaos.hxx.

◆ fDefaultObjectClass

ObjClassId_t ROOT::Experimental::Detail::RDaosContainer::fDefaultObjectClass {OC_SX}
private

Definition at line 240 of file RDaos.hxx.

◆ fPool

std::shared_ptr<RDaosPool> ROOT::Experimental::Detail::RDaosContainer::fPool
private

Definition at line 239 of file RDaos.hxx.

  • tree/ntuple/v7/inc/ROOT/RDaos.hxx
  • tree/ntuple/v7/src/RDaos.cxx