Logo ROOT  
Reference Guide
ROOT::Experimental::Detail::RDaosContainer Class Reference

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

Definition at line 148 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 objects; 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. More...
 
int ReadV (MultiObjectRWOperation_t &map)
 
int ReadV (MultiObjectRWOperation_t &map, ObjClassId_t cid)
 Perform a vector read operation on multiple objects. More...
 
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. More...
 
int WriteV (MultiObjectRWOperation_t &map)
 
int WriteV (MultiObjectRWOperation_t &map, ObjClassId_t cid)
 Perform a vector write operation on multiple objects. More...
 

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. More...
 

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 174 of file RDaos.cxx.

◆ ~RDaosContainer()

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

Definition at line 198 of file RDaos.cxx.

Member Function Documentation

◆ GetContainerUuid()

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

Definition at line 202 of file RDaos.cxx.

◆ GetDefaultObjectClass()

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

Definition at line 224 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 239 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 209 of file RDaos.cxx.

◆ ReadV() [1/2]

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

Definition at line 266 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 265 of file RDaos.hxx.

◆ SetDefaultObjectClass()

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

Definition at line 225 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 255 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 220 of file RDaos.cxx.

◆ WriteV() [1/2]

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

Definition at line 278 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 274 of file RDaos.hxx.

Friends And Related Function Documentation

◆ RDaosObject

friend class RDaosObject
friend

Definition at line 149 of file RDaos.hxx.

Member Data Documentation

◆ fContainerHandle

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

Definition at line 204 of file RDaos.hxx.

◆ fContainerLabel

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

Definition at line 206 of file RDaos.hxx.

◆ fContainerUuid

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

Definition at line 205 of file RDaos.hxx.

◆ fDefaultObjectClass

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

Definition at line 208 of file RDaos.hxx.

◆ fPool

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

Definition at line 207 of file RDaos.hxx.


The documentation for this class was generated from the following files: