MySQL 9.1.0
Source Code Documentation
Persisters Class Reference

Container of persisters used in the system. More...

#include <dict0mem.h>

Public Member Functions

 Persisters ()
 Constructor. More...
 
 ~Persisters ()
 Destructor. More...
 
Persisterget (persistent_type_t type) const
 Get the persister object with specified type. More...
 
Persisteradd (persistent_type_t type)
 Add a specified persister of type, we will allocate the Persister if there is no such persister exist, otherwise do nothing and return the existing one. More...
 
void remove (persistent_type_t type)
 Remove a specified persister of type, we will free the Persister. More...
 
size_t write (PersistentTableMetadata &metadata, byte *buffer)
 Serialize the metadata to a buffer. More...
 

Private Types

typedef std::map< persistent_type_t, Persister *, std::less< persistent_type_t >, ut::allocator< std::pair< const persistent_type_t, Persister * > > > persisters_t
 

Private Attributes

persisters_t m_persisters
 A map to store all persisters needed. More...
 

Detailed Description

Container of persisters used in the system.

Currently we don't need to protect this object since we only initialize it at very beginning and destroy it in the end. During the server running, we only get the persisters

Member Typedef Documentation

◆ persisters_t

typedef std::map< persistent_type_t, Persister *, std::less<persistent_type_t>, ut::allocator<std::pair<const persistent_type_t, Persister *> > > Persisters::persisters_t
private

Constructor & Destructor Documentation

◆ Persisters()

Persisters::Persisters ( )
inline

Constructor.

◆ ~Persisters()

Persisters::~Persisters ( )

Destructor.

Member Function Documentation

◆ add()

Persister * Persisters::add ( persistent_type_t  type)

Add a specified persister of type, we will allocate the Persister if there is no such persister exist, otherwise do nothing and return the existing one.

Parameters
[in]typepersister type
Returns
the persister of type

◆ get()

Persister * Persisters::get ( persistent_type_t  type) const

Get the persister object with specified type.

Parameters
[in]typepersister type
Returns
Persister object required or NULL if not found

◆ remove()

void Persisters::remove ( persistent_type_t  type)

Remove a specified persister of type, we will free the Persister.

Parameters
[in]typepersister type

◆ write()

size_t Persisters::write ( PersistentTableMetadata metadata,
byte buffer 
)

Serialize the metadata to a buffer.

Parameters
[in]metadatametadata to serialize
[out]bufferbuffer to store the serialized metadata
Returns
the length of serialized metadata

Member Data Documentation

◆ m_persisters

persisters_t Persisters::m_persisters
private

A map to store all persisters needed.


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