58 return hash<uint32_t>()(token.
token_);
77 virtual bool hasCallback() = 0;
101 using SharedPtr = std::unique_ptr<RequestData, DestructPtr>;
106 std::atomic<int> keepAliveCounter_{0};
119 setContext(std::make_shared<RequestContext>());
137 std::unique_ptr<RequestData>
data);
140 std::unique_ptr<RequestData> data) {
147 bool setContextDataIfAbsent(
149 std::unique_ptr<RequestData> data);
152 std::unique_ptr<RequestData> data) {
193 static std::shared_ptr<RequestContext> setContext(
194 std::shared_ptr<RequestContext> ctx);
197 return getStaticContext();
201 static std::shared_ptr<RequestContext>& getStaticContext();
209 static std::shared_ptr<RequestContext> setShallowCopyContext();
213 void overwriteContextData(
215 std::unique_ptr<RequestData> data);
218 std::unique_ptr<RequestData> data) {
229 bool doSetContextData(
231 std::unique_ptr<RequestData>& data,
235 std::unique_ptr<RequestData>& data,
237 return doSetContextData(
RequestToken(val), data, behaviour);
258 std::shared_ptr<RequestContext>
prev_;
301 std::unique_ptr<RequestData>
data)
307 std::unique_ptr<RequestData>
data)
326 std::shared_ptr<RequestContext>
prev_;
const RequestData * getContextData(const std::string &val) const
static std::shared_ptr< RequestContext > setContext(std::shared_ptr< RequestContext > ctx)
std::string getDebugString() const
bool hasContextData(const std::string &val) const
constexpr detail::Map< Move > move
bool operator==(const RequestToken &other) const
size_t operator()(const folly::RequestToken &token) const
—— Concurrent Priority Queue Implementation ——
bool setContextDataIfAbsent(const std::string &val, std::unique_ptr< RequestData > data)
RequestToken(const std::string &str)
void overwriteContextData(const RequestToken &val, std::unique_ptr< RequestData > data)
RequestContextScopeGuard(std::shared_ptr< RequestContext > ctx)
~ShallowCopyRequestContextScopeGuard()
ShallowCopyRequestContextScopeGuard()
static std::shared_ptr< RequestContext > saveContext()
void setContextData(const std::string &val, std::unique_ptr< RequestData > data)
std::shared_ptr< RequestContext > prev_
constexpr auto data(C &c) -> decltype(c.data())
RequestData * getContextData(const std::string &val)
~RequestContextScopeGuard()
sorted_vector_set< RequestData * > callbackData_
F14FastMap< RequestToken, RequestData::SharedPtr > requestData_
bool doSetContextData(const std::string &val, std::unique_ptr< RequestData > &data, DoSetBehaviour behaviour)
void overwriteContextData(const std::string &val, std::unique_ptr< RequestData > data)
std::unique_ptr< RequestData, DestructPtr > SharedPtr
std::shared_ptr< RequestContext > prev_
static Synchronized< F14FastMap< std::string, uint32_t > > & getCache()
ShallowCopyRequestContextScopeGuard(const RequestToken &val, std::unique_ptr< RequestData > data)
RequestContextScopeGuard()
folly::Synchronized< State > state_
ShallowCopyRequestContextScopeGuard(const std::string &val, std::unique_ptr< RequestData > data)
static RequestContext * get()
void clearContextData(const std::string &val)