Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::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::Internal::RDaosContainer::RDaosContainer ( std::shared_ptr< RDaosPool pool,
std::string_view  containerId,
bool  create = false 
)

Definition at line 175 of file RDaos.cxx.

◆ ~RDaosContainer()

ROOT::Experimental::Internal::RDaosContainer::~RDaosContainer ( )

Definition at line 199 of file RDaos.cxx.

Member Function Documentation

◆ GetContainerUuid()

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

Definition at line 204 of file RDaos.cxx.

◆ GetDefaultObjectClass()

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

Definition at line 256 of file RDaos.hxx.

◆ ReadSingleAkey() [1/2]

int ROOT::Experimental::Internal::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::Internal::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 211 of file RDaos.cxx.

◆ ReadV() [1/2]

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

Definition at line 298 of file RDaos.hxx.

◆ ReadV() [2/2]

int ROOT::Experimental::Internal::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::Internal::RDaosContainer::SetDefaultObjectClass ( const ObjClassId_t  cid)
inline

Definition at line 257 of file RDaos.hxx.

◆ VectorReadWrite()

int ROOT::Experimental::Internal::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 234 of file RDaos.cxx.

◆ WriteSingleAkey() [1/2]

int ROOT::Experimental::Internal::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::Internal::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 222 of file RDaos.cxx.

◆ WriteV() [1/2]

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

Definition at line 310 of file RDaos.hxx.

◆ WriteV() [2/2]

int ROOT::Experimental::Internal::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::Internal::RDaosContainer::fContainerHandle {}
private

Definition at line 236 of file RDaos.hxx.

◆ fContainerLabel

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

Definition at line 238 of file RDaos.hxx.

◆ fContainerUuid

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

Definition at line 237 of file RDaos.hxx.

◆ fDefaultObjectClass

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

Definition at line 240 of file RDaos.hxx.

◆ fPool

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

Definition at line 239 of file RDaos.hxx.

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