proxygen
ThreadSafeSSLSessionCache.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
17 
18 using folly::SharedMutex;
19 
20 namespace wangle {
21 
23  const std::string& identity,
24  SSLSessionPtr session) noexcept {
26  delegate_->setSSLSession(identity, std::move(session));
27 }
28 
30  const std::string& identity) const noexcept {
32  return delegate_->getSSLSession(identity);
33 }
34 
36  const std::string& identity) noexcept {
38  return delegate_->removeSSLSession(identity);
39 }
40 
43  return delegate_->supportsPersistence();
44 }
45 
48  return delegate_->size();
49 }
50 
51 }
SSLSessionPtr getSSLSession(const std::string &identity) const noexceptoverride
void setSSLSession(const std::string &identity, SSLSessionPtr session) noexceptoverride
bool supportsPersistence() const noexceptoverride
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
requires E e noexcept(noexcept(s.error(std::move(e))))
std::mutex mutex_
std::unique_ptr< SSL_SESSION, SessionDestructor > SSLSessionPtr
Definition: SSLSession.h:32
bool removeSSLSession(const std::string &identity) noexceptoverride
auto lock(SynchronizedLocker...lockersIn) -> std::tuple< typename SynchronizedLocker::LockedPtr... >
Definition: Synchronized.h:871
SharedMutexWritePriority SharedMutex
Definition: SharedMutex.h:1511
std::unique_ptr< SSLSessionCallbacks > delegate_
const char * string
Definition: Conv.cpp:212
const
Definition: upload.py:398