GRPC Core  18.0.0
Data Structures | Public Member Functions | Static Public Member Functions
tsi::SslSessionLRUCache Class Reference

#include <ssl_session_cache.h>

Data Structures

class  Node
 Node for single cached session. More...
 

Public Member Functions

 SslSessionLRUCache (size_t capacity)
 
 ~SslSessionLRUCache () override
 
 SslSessionLRUCache (const SslSessionLRUCache &)=delete
 
SslSessionLRUCacheoperator= (const SslSessionLRUCache &)=delete
 
size_t Size ()
 Returns current number of sessions in the cache. More...
 
void Put (const char *key, SslSessionPtr session)
 Add session in the cache using key. More...
 
SslSessionPtr Get (const char *key)
 Returns the session from the cache associated with key or null if not found. More...
 
- Public Member Functions inherited from grpc_core::RefCounted< SslSessionLRUCache >
 ~RefCounted ()=default
 
RefCountedPtr< SslSessionLRUCache > Ref () GRPC_MUST_USE_RESULT
 
RefCountedPtr< SslSessionLRUCache > Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
RefCountedPtr< SslSessionLRUCache > RefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< SslSessionLRUCache > RefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
 RefCounted (const RefCounted &)=delete
 
RefCountedoperator= (const RefCounted &)=delete
 
- Public Member Functions inherited from grpc_core::PolymorphicRefCount
virtual ~PolymorphicRefCount ()=default
 

Static Public Member Functions

static grpc_core::RefCountedPtr< SslSessionLRUCacheCreate (size_t capacity)
 Create new LRU cache with the given capacity. More...
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::RefCounted< SslSessionLRUCache >
 RefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 

Constructor & Destructor Documentation

◆ SslSessionLRUCache() [1/2]

tsi::SslSessionLRUCache::SslSessionLRUCache ( size_t  capacity)
explicit

◆ ~SslSessionLRUCache()

tsi::SslSessionLRUCache::~SslSessionLRUCache ( )
override

◆ SslSessionLRUCache() [2/2]

tsi::SslSessionLRUCache::SslSessionLRUCache ( const SslSessionLRUCache )
delete

Member Function Documentation

◆ Create()

static grpc_core::RefCountedPtr<SslSessionLRUCache> tsi::SslSessionLRUCache::Create ( size_t  capacity)
inlinestatic

Create new LRU cache with the given capacity.

◆ Get()

SslSessionPtr tsi::SslSessionLRUCache::Get ( const char *  key)

Returns the session from the cache associated with key or null if not found.

◆ operator=()

SslSessionLRUCache& tsi::SslSessionLRUCache::operator= ( const SslSessionLRUCache )
delete

◆ Put()

void tsi::SslSessionLRUCache::Put ( const char *  key,
SslSessionPtr  session 
)

Add session in the cache using key.

This operation may discard older sessions.

◆ Size()

size_t tsi::SslSessionLRUCache::Size ( )

Returns current number of sessions in the cache.


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