proxygen
wangle::SSLCacheProvider Class Referenceabstract

#include <SSLCacheProvider.h>

Classes

struct  CacheContext
 

Public Member Functions

virtual ~SSLCacheProvider ()=default
 
virtual bool setAsync (const std::string &sessionId, const std::string &value, std::chrono::seconds expiration)=0
 
virtual bool getAsync (const std::string &sessionId, CacheContext *context)=0
 
virtual folly::Future< folly::ssl::SSLSessionUniquePtrgetFuture (const std::string &sessionId)=0
 

Detailed Description

Interface to be implemented by providers of external session caches

Definition at line 28 of file SSLCacheProvider.h.

Constructor & Destructor Documentation

virtual wangle::SSLCacheProvider::~SSLCacheProvider ( )
virtualdefault

Member Function Documentation

virtual bool wangle::SSLCacheProvider::getAsync ( const std::string sessionId,
CacheContext context 
)
pure virtual

Retrieve a session from the external cache. When done, call the cache manager's onGetSuccess() or onGetFailure() callback.

Parameters
sessionIdSession ID to fetch
contextData to pass back to the SSLSessionCacheManager in the completion callback
Returns
true if the lookup of the session is initiated successfully (though not necessarily completed; the completion may happen either before or after this method returns), or false if the lookup cannot be initiated due to an error.
virtual folly::Future<folly::ssl::SSLSessionUniquePtr> wangle::SSLCacheProvider::getFuture ( const std::string sessionId)
pure virtual

Retrieve a session from the external cache. Returns a future that will hold the result of the request.

Parameters
sessionIdSession ID to fetch
Returns
MultiFuture referring to the result of this request.
virtual bool wangle::SSLCacheProvider::setAsync ( const std::string sessionId,
const std::string value,
std::chrono::seconds  expiration 
)
pure virtual

Store a session in the external cache.

Parameters
sessionIdIdentifier that can be used later to fetch the session with getAsync()
valueSerialized session to store
expirationRelative expiration time: seconds from now
Returns
true if the storing of the session is initiated successfully (though not necessarily completed; the completion may happen either before or after this method returns), or false if the storing cannot be initiated due to an error.

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