folly/folly/io/async/Request.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/io/async/Request.h>

#include <folly/GLog.h>
#include <folly/concurrency/container/SingleWriterFixedHashMap.h>
#include <folly/tracing/StaticTracepoint.h>

namespace folly {

RequestToken::RequestToken(const std::string& str) {}

std::string RequestToken::getDebugString() const {}

Synchronized<F14FastMap<std::string, uint32_t>>& RequestToken::getCache() {}

FOLLY_ALWAYS_INLINE
void RequestData::acquireRef() {}

void RequestData::releaseRefClearOnly() {}

void RequestData::releaseRefDeleteOnly() {}

FOLLY_ALWAYS_INLINE
void RequestData::releaseRefClearDelete() {}

FOLLY_NOINLINE
void RequestData::releaseRefClearDeleteSlow() {}

// The Combined struct keeps the two structures for context data
// and callbacks together, so that readers can protect consistent
// versions of the two structures together using hazard pointers.
struct RequestContext::State::Combined : hazptr_obj_base<Combined> {}; // Combined

RequestContext::State::State() = default;

FOLLY_ALWAYS_INLINE
RequestContext::State::State(const State& o) {}

RequestContext::State::~State() {}

class FOLLY_NODISCARD RequestContext::State::LockGuard {};

FOLLY_ALWAYS_INLINE
RequestContext::State::Combined* RequestContext::State::combined() const {}

FOLLY_ALWAYS_INLINE
RequestContext::State::Combined* RequestContext::State::ensureCombined() {}

FOLLY_ALWAYS_INLINE
void RequestContext::State::setCombined(Combined* p) {}

FOLLY_ALWAYS_INLINE
bool RequestContext::State::doSetContextData(
    const RequestToken& token,
    std::unique_ptr<RequestData>& data,
    DoSetBehaviour behaviour,
    bool safe) {}

FOLLY_ALWAYS_INLINE
RequestContext::State::SetContextDataResult
RequestContext::State::doSetContextDataHelper(
    const RequestToken& token,
    std::unique_ptr<RequestData>& data,
    DoSetBehaviour behaviour,
    bool safe) {}

FOLLY_ALWAYS_INLINE
RequestContext::State::Combined* FOLLY_NULLABLE
RequestContext::State::eraseOldData(
    RequestContext::State::Combined* cur,
    const RequestToken& token,
    RequestData* olddata,
    bool safe) {}

FOLLY_ALWAYS_INLINE
RequestContext::State::Combined* FOLLY_NULLABLE
RequestContext::State::insertNewData(
    RequestContext::State::Combined* cur,
    const RequestToken& token,
    std::unique_ptr<RequestData>& data,
    bool found) {}

FOLLY_ALWAYS_INLINE
bool RequestContext::State::hasContextData(const RequestToken& token) const {}

FOLLY_ALWAYS_INLINE
RequestData* FOLLY_NULLABLE
RequestContext::State::getContextData(const RequestToken& token) {}

FOLLY_ALWAYS_INLINE
const RequestData* FOLLY_NULLABLE
RequestContext::State::getContextData(const RequestToken& token) const {}

FOLLY_ALWAYS_INLINE
void RequestContext::State::onSet() {}

FOLLY_ALWAYS_INLINE
void RequestContext::State::onUnset() {}

void RequestContext::State::clearContextData(const RequestToken& token) {}

RequestContext::State::Combined* RequestContext::State::expand(
    RequestContext::State::Combined* c) {}

RequestContext::RequestContext() :{}

RequestContext::RequestContext(intptr_t rootid) :{}

RequestContext::RequestContext(const RequestContext& ctx, intptr_t rootid, Tag)
    :{}

RequestContext::RequestContext(const RequestContext& ctx, Tag)
    :{}

/* static */ std::shared_ptr<RequestContext> RequestContext::copyAsRoot(
    const RequestContext& ctx, intptr_t rootid) {}

/* static */ std::shared_ptr<RequestContext> RequestContext::copyAsChild(
    const RequestContext& ctx) {}

void RequestContext::setContextData(
    const RequestToken& token, std::unique_ptr<RequestData> data) {}

bool RequestContext::setContextDataIfAbsent(
    const RequestToken& token, std::unique_ptr<RequestData> data) {}

void RequestContext::overwriteContextData(
    const RequestToken& token, std::unique_ptr<RequestData> data, bool safe) {}

bool RequestContext::hasContextData(const RequestToken& val) const {}

RequestData* FOLLY_NULLABLE
RequestContext::getContextData(const RequestToken& val) {}

const RequestData* FOLLY_NULLABLE
RequestContext::getContextData(const RequestToken& val) const {}

void RequestContext::onSet() {}

void RequestContext::onUnset() {}

void RequestContext::clearContextData(const RequestToken& val) {}

/* static */ std::shared_ptr<RequestContext> RequestContext::setContext(
    std::shared_ptr<RequestContext> const& newCtx) {}

/* static */ std::shared_ptr<RequestContext> RequestContext::setContext(
    std::shared_ptr<RequestContext>&& newCtx_) {}

namespace {
thread_local bool getStaticContextCalled =;
}

/* static */ RequestContext::StaticContext& RequestContext::getStaticContext() {}

/* static */ RequestContext::StaticContext*
RequestContext::tryGetStaticContext() {}

/* static */ RequestContext::StaticContextAccessor
RequestContext::accessAllThreads() {}

/* static */ std::vector<RequestContext::RootIdInfo>
RequestContext::getRootIdsFromAllThreads() {}

/* static */ std::shared_ptr<RequestContext>
RequestContext::setShallowCopyContext() {}

/* static */ RequestContext* RequestContext::get() {}

/* static */ RequestContext* RequestContext::try_get() {}

} // namespace folly