proxygen
|
#include <SettingsImpl.h>
Public Types | |
using | Contents = SettingContents< T > |
Public Member Functions | |
void | setFromString (StringPiece newValue, StringPiece reason, SnapshotBase *snapshot) override |
std::pair< std::string, std::string > | getAsString (const SnapshotBase *snapshot) const override |
void | resetToDefault (SnapshotBase *snapshot) override |
const SettingMetadata & | meta () const override |
std::conditional_t< IsSmallPOD< T >::value, T, const T & > | getWithHint (std::atomic< uint64_t > &trivialStorage) const |
const SettingContents< T > & | getSlow () const |
T | getImpl (std::true_type, std::atomic< uint64_t > &trivialStorage) const |
const T & | getImpl (std::false_type, std::atomic< uint64_t > &) const |
void | set (const T &t, StringPiece reason, SnapshotBase *snapshot=nullptr) |
const T & | defaultValue () const |
SettingCore (SettingMetadata meta, T defaultValue, std::atomic< uint64_t > &trivialStorage) | |
Private Member Functions | |
FOLLY_ALWAYS_INLINE const std::shared_ptr< Contents > & | tlValue () const |
FOLLY_NOINLINE const std::shared_ptr< Contents > & | tlValueSlow () const |
Private Attributes | |
SettingMetadata | meta_ |
const T | defaultValue_ |
SharedMutex | globalLock_ |
std::shared_ptr< Contents > | globalValue_ |
std::atomic< uint64_t > & | trivialStorage_ |
CachelinePadded< std::atomic< Version > > | settingVersion_ {1} |
ThreadLocal< CachelinePadded< std::pair< Version, std::shared_ptr< Contents > > > > | localValue_ |
Definition at line 249 of file SettingsImpl.h.
using folly::settings::detail::SettingCore< T >::Contents = SettingContents<T> |
Definition at line 251 of file SettingsImpl.h.
|
inline |
Definition at line 334 of file SettingsImpl.h.
References folly::settings::detail::registerSetting().
|
inline |
Definition at line 330 of file SettingsImpl.h.
|
inlineoverride |
Definition at line 260 of file SettingsImpl.h.
References folly::settings::detail::getSlow().
|
inline |
Definition at line 291 of file SettingsImpl.h.
References folly::pushmi::detail::t, and uint64_t.
|
inline |
Non-SmallPOD version: read the thread local shared_ptr
Definition at line 301 of file SettingsImpl.h.
|
inline |
Definition at line 285 of file SettingsImpl.h.
|
inline |
trivialStorage | must refer to the same location as the internal trivialStorage_. This hint will generate better inlined code since the address is known at compile time at the callsite. |
Definition at line 281 of file SettingsImpl.h.
|
inlineoverride |
Definition at line 271 of file SettingsImpl.h.
|
inlineoverride |
Definition at line 267 of file SettingsImpl.h.
|
inline |
Definition at line 306 of file SettingsImpl.h.
References getKey(), folly::settings::detail::nextGlobalVersion(), folly::settings::detail::saveValueForOutstandingSnapshots(), folly::settings::detail::SettingCore< T >::set(), folly::pushmi::detail::t, uint64_t, and value.
Referenced by folly::settings::detail::SettingCore< T >::set().
|
inlineoverride |
Definition at line 253 of file SettingsImpl.h.
References folly::Range< Iter >::str().
|
inlineprivate |
Definition at line 365 of file SettingsImpl.h.
References LIKELY, and folly::value().
|
inlineprivate |
Definition at line 372 of file SettingsImpl.h.
References folly::value().
|
private |
Definition at line 351 of file SettingsImpl.h.
|
private |
Definition at line 353 of file SettingsImpl.h.
|
private |
Definition at line 354 of file SettingsImpl.h.
|
private |
Definition at line 363 of file SettingsImpl.h.
|
private |
Definition at line 350 of file SettingsImpl.h.
|
private |
Definition at line 360 of file SettingsImpl.h.
|
private |
Definition at line 356 of file SettingsImpl.h.