GRPC Core  9.0.0
Data Structures | Public Member Functions | Static Public Member Functions
grpc_core::SliceWeakHashTable< T, Size > Class Template Reference

#include <slice_weak_hash_table.h>

Public Member Functions

 SliceWeakHashTable ()=default
 Use Create function instead of using this directly. More...
 
 ~SliceWeakHashTable ()=default
 
void Add (const grpc_slice &key, T value)
 Add a mapping from key to value, taking ownership of key. More...
 
const T * Get (const grpc_slice &key) const
 Returns the value from the table associated with / key or null if not found. More...
 
- Public Member Functions inherited from grpc_core::RefCounted< SliceWeakHashTable< T, Size > >
 ~RefCounted ()=default
 
RefCountedPtr< SliceWeakHashTable< T, Size > > Ref () GRPC_MUST_USE_RESULT
 
RefCountedPtr< SliceWeakHashTable< T, Size > > Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
bool RefIfNonZero ()
 
bool RefIfNonZero (const DebugLocation &location, const char *reason)
 
 RefCounted (const RefCounted &)=delete
 
RefCountedoperator= (const RefCounted &)=delete
 
- Public Member Functions inherited from grpc_core::PolymorphicRefCount
virtual ~PolymorphicRefCount ()=default
 

Static Public Member Functions

static RefCountedPtr< SliceWeakHashTableCreate ()
 Creates a new table of at most size entries. More...
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::RefCounted< SliceWeakHashTable< T, Size > >
 RefCounted (TraceFlagT *trace_flag=nullptr, intptr_t initial_refcount=1)
 

Constructor & Destructor Documentation

◆ SliceWeakHashTable()

template<typename T , size_t Size>
grpc_core::SliceWeakHashTable< T, Size >::SliceWeakHashTable ( )
default

Use Create function instead of using this directly.

◆ ~SliceWeakHashTable()

template<typename T , size_t Size>
grpc_core::SliceWeakHashTable< T, Size >::~SliceWeakHashTable ( )
default

Member Function Documentation

◆ Add()

template<typename T , size_t Size>
void grpc_core::SliceWeakHashTable< T, Size >::Add ( const grpc_slice key,
value 
)
inline

Add a mapping from key to value, taking ownership of key.

This operation will always succeed. It may discard older entries.

◆ Create()

template<typename T , size_t Size>
static RefCountedPtr<SliceWeakHashTable> grpc_core::SliceWeakHashTable< T, Size >::Create ( )
inlinestatic

Creates a new table of at most size entries.

◆ Get()

template<typename T , size_t Size>
const T* grpc_core::SliceWeakHashTable< T, Size >::Get ( const grpc_slice key) const
inline

Returns the value from the table associated with / key or null if not found.


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