XRootD
Loading...
Searching...
No Matches
XrdEc::Config Class Reference

Global configuration for the EC module. More...

#include <XrdEcConfig.hh>

Collaboration diagram for XrdEc::Config:

Public Member Functions

RedundancyProviderGetRedundancy (const ObjCfg &objcfg)
 Get redundancy provider for given data object configuration.

Static Public Member Functions

static ConfigInstance ()
 Singleton access.

Public Attributes

bool enable_plugins

Detailed Description

Global configuration for the EC module.

Definition at line 39 of file XrdEcConfig.hh.

Member Function Documentation

◆ GetRedundancy()

RedundancyProvider & XrdEc::Config::GetRedundancy ( const ObjCfg & objcfg)
inline

Get redundancy provider for given data object configuration.

Definition at line 55 of file XrdEcConfig.hh.

56 {
57 std::string key;
58 key += std::to_string( objcfg.nbchunks );
59 key += ':';
60 key += std::to_string( objcfg.nbparity );
61 key += '-';
62 key += std::to_string( uint8_t( objcfg.datasize ) );
63
64 std::unique_lock<std::mutex> lck( mtx );
65 auto itr = redundancies.find( key );
66 if( itr == redundancies.end() )
67 {
68 auto p = redundancies.emplace( std::piecewise_construct,
69 std::forward_as_tuple(key),
70 std::forward_as_tuple(objcfg) );
71 return p.first->second;
72 }
73 else
74 return itr->second;
75 }

References XrdEc::ObjCfg::datasize, XrdEc::ObjCfg::nbchunks, and XrdEc::ObjCfg::nbparity.

Referenced by XrdEc::WrtBuff::Encode().

Here is the caller graph for this function:

◆ Instance()

Config & XrdEc::Config::Instance ( )
inlinestatic

Singleton access.

Definition at line 46 of file XrdEcConfig.hh.

47 {
48 static Config config;
49 return config;
50 }

Referenced by XrdCl::EcHandler::EcHandler(), XrdEc::WrtBuff::Encode(), XrdEc::Reader::Open(), and XrdEc::StrmWriter::Open().

Here is the caller graph for this function:

Member Data Documentation

◆ enable_plugins

bool XrdEc::Config::enable_plugins

Definition at line 77 of file XrdEcConfig.hh.

Referenced by XrdCl::EcHandler::EcHandler().


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