reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
using namespace oceanbase::common;
|
||||
|
||||
class ExtMsQueueTest : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
static const int64_t KEY_COUNT = 10;
|
||||
static const int64_t MAX_CACHED_MS_QUEUE_ITEM_COUNT = KEY_COUNT;
|
||||
static const int64_t MSQ_QUEUE_COUNT = 4;
|
||||
@ -31,7 +31,7 @@ class ExtMsQueueTest : public ::testing::Test {
|
||||
static const int64_t OP_TIMEOUT = 100 * 1000;
|
||||
static const int64_t WAIT_TIME = 100;
|
||||
|
||||
public:
|
||||
public:
|
||||
typedef ObPartitionKey KeyType;
|
||||
typedef ObLink TaskType;
|
||||
|
||||
@ -60,13 +60,13 @@ class ExtMsQueueTest : public ::testing::Test {
|
||||
void wait_consumers_();
|
||||
int terminate_all_ms_queue_();
|
||||
|
||||
public:
|
||||
public:
|
||||
ExtMsQueueTest();
|
||||
virtual ~ExtMsQueueTest();
|
||||
virtual void SetUp();
|
||||
virtual void TearDown();
|
||||
|
||||
public:
|
||||
public:
|
||||
int64_t end_time_;
|
||||
KeyValue kv_[KEY_COUNT];
|
||||
TaskType task_[MSQ_QUEUE_COUNT]; // every Queue in MsQueue corresponds to a Task
|
||||
@ -76,7 +76,7 @@ class ExtMsQueueTest : public ::testing::Test {
|
||||
int64_t producer_thread_index_counter_;
|
||||
ObExtMsQueue<KeyType> ext_ms_queue_;
|
||||
|
||||
private:
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ExtMsQueueTest);
|
||||
};
|
||||
|
||||
|
||||
@ -17,21 +17,21 @@ using oceanbase::common::LightyQueue;
|
||||
using oceanbase::lib::ThreadPool;
|
||||
|
||||
class Productor : public ThreadPool {
|
||||
public:
|
||||
public:
|
||||
Productor(LightyQueue& q, int th_cnt) : q_(q)
|
||||
{
|
||||
set_thread_count(th_cnt);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
void run1() override;
|
||||
|
||||
private:
|
||||
private:
|
||||
LightyQueue& q_;
|
||||
}; // end of class Productor
|
||||
|
||||
class Consumer : public ThreadPool {
|
||||
public:
|
||||
public:
|
||||
Consumer(LightyQueue& q, int th_cnt) : q_(q), cnt_(0)
|
||||
{
|
||||
set_thread_count(th_cnt);
|
||||
@ -42,10 +42,10 @@ class Consumer : public ThreadPool {
|
||||
return cnt_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
void run1() override;
|
||||
|
||||
private:
|
||||
private:
|
||||
LightyQueue& q_;
|
||||
uint64_t cnt_;
|
||||
}; // end of class Consumer
|
||||
|
||||
@ -20,7 +20,7 @@ using namespace oceanbase::lib;
|
||||
using namespace oceanbase::common;
|
||||
|
||||
class TestQueue : public ThreadPool {
|
||||
public:
|
||||
public:
|
||||
enum { BATCH = 64 };
|
||||
struct QData : public ObLink {
|
||||
QData() : val_(0)
|
||||
@ -101,7 +101,7 @@ class TestQueue : public ThreadPool {
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
int64_t seq_ CACHE_ALIGNED;
|
||||
int64_t limit_;
|
||||
Queue queue_;
|
||||
|
||||
Reference in New Issue
Block a user