Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
MapUpdater Class Reference

#include <MapUpdater.h>

Collaboration diagram for MapUpdater:

Public Member Functions

int activate (size_t num_threads)
bool activated ()
int deactivate ()
DelayExecutorMetricsSnapshot GetExecutorMetricsSnapshot () const
 MapUpdater ()
void ResetExecutorMetrics ()
int schedule_update (Map &map, uint32 diff)
int wait ()
virtual ~MapUpdater ()

Private Member Functions

void update_finished ()

Private Attributes

std::condition_variable condition
std::mutex Lock
DelayExecutor m_executor
size_t pending_requests

Friends

class MapUpdateRequest

Detailed Description

Definition at line 17 of file MapUpdater.h.

Constructor & Destructor Documentation

◆ MapUpdater()

MapUpdater::MapUpdater ( )

Definition at line 49 of file MapUpdater.cpp.

References m_executor, and pending_requests.

◆ ~MapUpdater()

MapUpdater::~MapUpdater ( )
virtual

Definition at line 52 of file MapUpdater.cpp.

References deactivate().

Member Function Documentation

◆ activate()

int MapUpdater::activate ( size_t num_threads)

Definition at line 57 of file MapUpdater.cpp.

References m_executor.

◆ activated()

bool MapUpdater::activated ( )

Definition at line 107 of file MapUpdater.cpp.

References m_executor.

◆ deactivate()

int MapUpdater::deactivate ( )

Definition at line 62 of file MapUpdater.cpp.

References m_executor, and wait().

Referenced by ~MapUpdater().

◆ GetExecutorMetricsSnapshot()

DelayExecutorMetricsSnapshot MapUpdater::GetExecutorMetricsSnapshot ( ) const
inline

Definition at line 29 of file MapUpdater.h.

References m_executor.

◆ ResetExecutorMetrics()

void MapUpdater::ResetExecutorMetrics ( )
inline

Definition at line 30 of file MapUpdater.h.

References m_executor.

◆ schedule_update()

◆ update_finished()

◆ wait()

◆ MapUpdateRequest

friend class MapUpdateRequest
friend

Definition at line 22 of file MapUpdater.h.

References MapUpdateRequest.

Referenced by MapUpdateRequest, and schedule_update().

Member Data Documentation

◆ condition

std::condition_variable MapUpdater::condition
private

Definition at line 35 of file MapUpdater.h.

Referenced by update_finished(), and wait().

◆ Lock

std::mutex MapUpdater::Lock
private

Definition at line 34 of file MapUpdater.h.

Referenced by schedule_update(), update_finished(), and wait().

◆ m_executor

DelayExecutor MapUpdater::m_executor
private

◆ pending_requests

size_t MapUpdater::pending_requests
private

Definition at line 36 of file MapUpdater.h.

Referenced by MapUpdater(), schedule_update(), update_finished(), and wait().


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