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 123 of file RDaos.hxx.

Classes

struct  DaosEventQueue
 
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 ObjClassId_t = RDaosObject::ObjClassId
 

Public Member Functions

 RDaosContainer (std::shared_ptr< RDaosPool > pool, std::string_view containerUuid, bool create=false)
 
 ~RDaosContainer ()
 
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 (std::vector< RWOperation > &vec)
 
int ReadV (std::vector< RWOperation > &vec, ObjClassId_t cid)
 Perform a vector read operation on (possibly) 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 (std::vector< RWOperation > &vec)
 
int WriteV (std::vector< RWOperation > &vec, ObjClassId_t cid)
 Perform a vector write operation on (possibly) multiple objects. More...
 

Private Member Functions

template<typename Fn >
int VectorReadWrite (std::vector< RWOperation > &vec, ObjClassId_t cid, Fn fn)
 Perform a vector read/write operation on different objects. More...
 

Private Attributes

daos_handle_t fContainerHandle {}
 
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

◆ ObjClassId_t

Constructor & Destructor Documentation

◆ RDaosContainer()

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

Definition at line 146 of file RDaos.cxx.

◆ ~RDaosContainer()

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

Definition at line 162 of file RDaos.cxx.

Member Function Documentation

◆ GetDefaultObjectClass()

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

Definition at line 190 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 205 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 166 of file RDaos.cxx.

◆ ReadV() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadV ( std::vector< RWOperation > &  vec)
inline

Definition at line 233 of file RDaos.hxx.

◆ ReadV() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::ReadV ( std::vector< RWOperation > &  vec,
ObjClassId_t  cid 
)
inline

Perform a vector read operation on (possibly) multiple objects.

Parameters
vecA std::vector<RWOperation> that describes read operations to perform.
cidAn object class ID.
Returns
Number of operations that could not complete.

Definition at line 231 of file RDaos.hxx.

◆ SetDefaultObjectClass()

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

Definition at line 191 of file RDaos.hxx.

◆ VectorReadWrite()

template<typename Fn >
int ROOT::Experimental::Detail::RDaosContainer::VectorReadWrite ( std::vector< RWOperation > &  vec,
ObjClassId_t  cid,
Fn  fn 
)
inlineprivate

Perform a vector read/write operation on different objects.

Parameters
vecA std::vector<RWOperation> that describes read/write operations to perform.
cidThe daos_oclass_id_t used to qualify OIDs.
fnEither std::mem_fn<&RDaosObject::Fetch> (read) or std::mem_fn<&RDaosObject::Update> (write).
Returns
Number of requests that did not complete; this should be 0 after a successful call.

Definition at line 168 of file RDaos.hxx.

◆ 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 221 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 176 of file RDaos.cxx.

◆ WriteV() [1/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteV ( std::vector< RWOperation > &  vec)
inline

Definition at line 243 of file RDaos.hxx.

◆ WriteV() [2/2]

int ROOT::Experimental::Detail::RDaosContainer::WriteV ( std::vector< RWOperation > &  vec,
ObjClassId_t  cid 
)
inline

Perform a vector write operation on (possibly) multiple objects.

Parameters
vecA std::vector<RWOperation> that describes write operations to perform.
cidAn object class ID.
Returns
Number of operations that could not complete.

Definition at line 241 of file RDaos.hxx.

Friends And Related Function Documentation

◆ RDaosObject

friend class RDaosObject
friend

Definition at line 124 of file RDaos.hxx.

Member Data Documentation

◆ fContainerHandle

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

Definition at line 155 of file RDaos.hxx.

◆ fContainerUuid

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

Definition at line 156 of file RDaos.hxx.

◆ fDefaultObjectClass

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

Definition at line 158 of file RDaos.hxx.

◆ fPool

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

Definition at line 157 of file RDaos.hxx.


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