A RDaosContainer provides read/write access to objects in a given container.
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< RDaosPool > | fPool |
Friends | |
class | RDaosObject |
#include <ROOT/RDaos.hxx>
using ROOT::Experimental::Internal::RDaosContainer::MultiObjectRWOperation_t = std::unordered_map<ROidDkeyPair, RWOperation, ROidDkeyPair::Hash> |
ROOT::Experimental::Internal::RDaosContainer::~RDaosContainer | ( | ) |
std::string ROOT::Experimental::Internal::RDaosContainer::GetContainerUuid | ( | ) |
|
inline |
|
inline |
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.
buffer | The address of a buffer that has capacity for at least length bytes. |
length | Length of the buffer. |
oid | A 128-bit DAOS object identifier. |
dkey | The distribution key used for this operation. |
akey | The attribute key used for this operation. |
cid | An object class ID. |
|
inline |
|
inline |
|
inline |
|
private |
Perform a vector read/write operation on different objects.
map | A MultiObjectRWOperation_t that describes read/write operations to perform. |
cid | The daos_oclass_id_t used to qualify OIDs. |
fn | Either &RDaosObject::Fetch (read) or &RDaosObject::Update (write). |
|
inline |
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.
buffer | The address of the source buffer. |
length | Length of the buffer. |
oid | A 128-bit DAOS object identifier. |
dkey | The distribution key used for this operation. |
akey | The attribute key used for this operation. |
cid | An object class ID. |
|
inline |
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |