Loading...
Searching...
No Matches
resdb::GeoGlobalExecutor Class Reference

#include <geo_global_executor.h>

Inheritance diagram for resdb::GeoGlobalExecutor:
resdb::MockGeoGlobalExecutor

Public Member Functions

 GeoGlobalExecutor (std::unique_ptr< TransactionManager > global_transaction_manager, const ResDBConfig &config)
 
virtual ~GeoGlobalExecutor ()
 
virtual void Execute (std::unique_ptr< Request > request)
 
virtual int OrderGeoRequest (std::unique_ptr< Request > request)
 
void Stop ()
 
std::unique_ptr< BatchUserResponse > GetResponseMsg ()
 

Protected Attributes

std::unique_ptr< TransactionManager > global_transaction_manager_
 
Stats * global_stats_
 
std::thread execute_round_thread_
 
std::thread order_thread_
 
ExecuteMap execute_map_
 
uint64_t next_seq_ = 1
 
int next_region_ = 1
 
size_t region_size_
 
ResDBConfig config_
 
std::atomic< bool > is_stop_
 
std::mutex mutex_
 
std::condition_variable cv_
 
LockFreeQueue< Request > order_queue_
 
LockFreeQueue< BatchUserResponse > resp_queue_
 
int my_region_
 

Detailed Description

Definition at line 32 of file geo_global_executor.h.

Constructor & Destructor Documentation

◆ GeoGlobalExecutor()

resdb::GeoGlobalExecutor::GeoGlobalExecutor ( std::unique_ptr< TransactionManager >  global_transaction_manager,
const ResDBConfig &  config 
)

Definition at line 26 of file geo_global_executor.cpp.

◆ ~GeoGlobalExecutor()

resdb::GeoGlobalExecutor::~GeoGlobalExecutor ( )
virtual

Definition at line 38 of file geo_global_executor.cpp.

Member Function Documentation

◆ Execute()

void resdb::GeoGlobalExecutor::Execute ( std::unique_ptr< Request >  request)
virtual

Definition at line 47 of file geo_global_executor.cpp.

◆ GetResponseMsg()

std::unique_ptr< BatchUserResponse > resdb::GeoGlobalExecutor::GetResponseMsg ( )

Definition at line 127 of file geo_global_executor.cpp.

◆ OrderGeoRequest()

int resdb::GeoGlobalExecutor::OrderGeoRequest ( std::unique_ptr< Request >  request)
virtual

Definition at line 77 of file geo_global_executor.cpp.

◆ Stop()

void resdb::GeoGlobalExecutor::Stop ( )

Definition at line 40 of file geo_global_executor.cpp.

Member Data Documentation

◆ config_

ResDBConfig resdb::GeoGlobalExecutor::config_
protected

Definition at line 62 of file geo_global_executor.h.

◆ cv_

std::condition_variable resdb::GeoGlobalExecutor::cv_
protected

Definition at line 65 of file geo_global_executor.h.

◆ execute_map_

ExecuteMap resdb::GeoGlobalExecutor::execute_map_
protected

Definition at line 58 of file geo_global_executor.h.

◆ execute_round_thread_

std::thread resdb::GeoGlobalExecutor::execute_round_thread_
protected

Definition at line 57 of file geo_global_executor.h.

◆ global_stats_

Stats* resdb::GeoGlobalExecutor::global_stats_
protected

Definition at line 56 of file geo_global_executor.h.

◆ global_transaction_manager_

std::unique_ptr<TransactionManager> resdb::GeoGlobalExecutor::global_transaction_manager_
protected

Definition at line 55 of file geo_global_executor.h.

◆ is_stop_

std::atomic<bool> resdb::GeoGlobalExecutor::is_stop_
protected

Definition at line 63 of file geo_global_executor.h.

◆ mutex_

std::mutex resdb::GeoGlobalExecutor::mutex_
protected

Definition at line 64 of file geo_global_executor.h.

◆ my_region_

int resdb::GeoGlobalExecutor::my_region_
protected

Definition at line 68 of file geo_global_executor.h.

◆ next_region_

int resdb::GeoGlobalExecutor::next_region_ = 1
protected

Definition at line 60 of file geo_global_executor.h.

◆ next_seq_

uint64_t resdb::GeoGlobalExecutor::next_seq_ = 1
protected

Definition at line 59 of file geo_global_executor.h.

◆ order_queue_

LockFreeQueue<Request> resdb::GeoGlobalExecutor::order_queue_
protected

Definition at line 66 of file geo_global_executor.h.

◆ order_thread_

std::thread resdb::GeoGlobalExecutor::order_thread_
protected

Definition at line 57 of file geo_global_executor.h.

◆ region_size_

size_t resdb::GeoGlobalExecutor::region_size_
protected

Definition at line 61 of file geo_global_executor.h.

◆ resp_queue_

LockFreeQueue<BatchUserResponse> resdb::GeoGlobalExecutor::resp_queue_
protected

Definition at line 67 of file geo_global_executor.h.