proxygen
folly::RequestData Class Referenceabstract

#include <Request.h>

Inheritance diagram for folly::RequestData:
folly::RequestEventBase TestData TestData TestData

Classes

struct  DestructPtr
 

Public Member Functions

virtual ~RequestData ()=default
 
virtual bool hasCallback ()=0
 
virtual void onSet ()
 
virtual void onUnset ()
 

Private Types

using SharedPtr = std::unique_ptr< RequestData, DestructPtr >
 

Static Private Member Functions

static SharedPtr constructPtr (RequestData *ptr)
 

Private Attributes

std::atomic< int > keepAliveCounter_ {0}
 

Friends

class RequestContext
 

Detailed Description

Definition at line 68 of file Request.h.

Member Typedef Documentation

using folly::RequestData::SharedPtr = std::unique_ptr<RequestData, DestructPtr>
private

Definition at line 101 of file Request.h.

Constructor & Destructor Documentation

virtual folly::RequestData::~RequestData ( )
virtualdefault

Member Function Documentation

RequestData::SharedPtr folly::RequestData::constructPtr ( RequestData ptr)
staticprivate

Definition at line 77 of file Request.cpp.

References keepAliveCounter_.

Referenced by folly::RequestContext::doSetContextData(), and folly::RequestContext::setShallowCopyContext().

78  {
79  if (ptr) {
80  auto keepAliveCounter =
81  ptr->keepAliveCounter_.fetch_add(1, std::memory_order_relaxed);
82  DCHECK(keepAliveCounter >= 0);
83  }
84  return SharedPtr(ptr);
85 }
void * ptr
std::unique_ptr< RequestData, DestructPtr > SharedPtr
Definition: Request.h:101
virtual bool folly::RequestData::hasCallback ( )
pure virtual
virtual void folly::RequestData::onSet ( )
inlinevirtual

Reimplemented in TestData.

Definition at line 81 of file Request.h.

Referenced by folly::RequestContext::setContext().

81 {}
virtual void folly::RequestData::onUnset ( )
inlinevirtual

Reimplemented in TestData.

Definition at line 85 of file Request.h.

Referenced by folly::RequestContext::setContext().

85 {}

Friends And Related Function Documentation

friend class RequestContext
friend

Definition at line 94 of file Request.h.

Member Data Documentation

std::atomic<int> folly::RequestData::keepAliveCounter_ {0}
private

Definition at line 106 of file Request.h.

Referenced by constructPtr(), and folly::RequestData::DestructPtr::operator()().


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