proxygen
folly::detail::BufferedDigest< DigestT, ClockT > Class Template Reference

#include <BufferedStat.h>

Inheritance diagram for folly::detail::BufferedDigest< DigestT, ClockT >:
folly::detail::BufferedStat< DigestT, ClockT >

Public Types

using TimePoint = typename ClockT::time_point
 
- Public Types inherited from folly::detail::BufferedStat< DigestT, ClockT >
using TimePoint = typename ClockT::time_point
 

Public Member Functions

 BufferedDigest (typename ClockT::duration bufferDuration, size_t bufferSize, size_t digestSize)
 
DigestT get (TimePoint now=ClockT::now())
 
void onNewDigest (DigestT digest, TimePoint newExpiry, TimePoint oldExpiry, const std::unique_lock< SharedMutex > &g) final
 
- Public Member Functions inherited from folly::detail::BufferedStat< DigestT, ClockT >
 BufferedStat ()=delete
 
 BufferedStat (typename ClockT::duration bufferDuration, size_t bufferSize, size_t digestSize)
 
virtual ~BufferedStat ()
 
void append (double value, TimePoint now=ClockT::now())
 
void flush ()
 

Private Attributes

DigestT digest_
 

Additional Inherited Members

- Protected Member Functions inherited from folly::detail::BufferedStat< DigestT, ClockT >
std::unique_lock< SharedMutexupdateIfExpired (TimePoint now)
 
std::unique_lock< SharedMutexupdate ()
 
- Protected Attributes inherited from folly::detail::BufferedStat< DigestT, ClockT >
const ClockT::duration bufferDuration_
 
std::atomic< TimePointHolderexpiry_
 
SharedMutex mutex_
 

Detailed Description

template<typename DigestT, typename ClockT>
class folly::detail::BufferedDigest< DigestT, ClockT >

Definition at line 100 of file BufferedStat.h.

Member Typedef Documentation

template<typename DigestT, typename ClockT>
using folly::detail::BufferedDigest< DigestT, ClockT >::TimePoint = typename ClockT::time_point

Definition at line 102 of file BufferedStat.h.

Constructor & Destructor Documentation

template<typename DigestT , typename ClockT>
folly::detail::BufferedDigest< DigestT, ClockT >::BufferedDigest ( typename ClockT::duration  bufferDuration,
size_t  bufferSize,
size_t  digestSize 
)

Definition at line 88 of file BufferedStat-defs.h.

92  : BufferedStat<DigestT, ClockT>(bufferDuration, bufferSize, digestSize),
93  digest_(digestSize) {}

Member Function Documentation

template<typename DigestT , typename ClockT >
DigestT folly::detail::BufferedDigest< DigestT, ClockT >::get ( TimePoint  now = ClockT::now())

Definition at line 96 of file BufferedStat-defs.h.

References folly::detail::BufferedDigest< DigestT, ClockT >::digest_, g(), and folly::detail::BufferedStat< DigestT, ClockT >::updateIfExpired().

96  {
97  auto g = this->updateIfExpired(now);
98  return digest_;
99 }
std::chrono::steady_clock::time_point now()
std::unique_lock< SharedMutex > updateIfExpired(TimePoint now)
g_t g(f_t)
template<typename DigestT, typename ClockT >
void folly::detail::BufferedDigest< DigestT, ClockT >::onNewDigest ( DigestT  digest,
TimePoint  newExpiry,
TimePoint  oldExpiry,
const std::unique_lock< SharedMutex > &  g 
)
finalvirtual

Implements folly::detail::BufferedStat< DigestT, ClockT >.

Definition at line 102 of file BufferedStat-defs.h.

References a, folly::detail::BufferedDigest< DigestT, ClockT >::digest_, merge(), and folly::gen::move.

106  {
107  std::array<DigestT, 2> a{{digest_, std::move(digest)}};
109 }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
char a
void merge(unsigned int iters, size_t maxSize, size_t bufSize)

Member Data Documentation

template<typename DigestT, typename ClockT>
DigestT folly::detail::BufferedDigest< DigestT, ClockT >::digest_
private

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