Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / msg / FastStrategy.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4  * Ceph - scalable distributed file system
5  *
6  * Copyright (C) 2014 CohortFS, LLC
7  *
8  * This is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License version 2.1, as published by the Free Software
11  * Foundation.  See file COPYING.
12  *
13  */
14
15
16 #ifndef FAST_STRATEGY_H
17 #define FAST_STRATEGY_H
18 #include "DispatchStrategy.h"
19
20 class FastStrategy : public DispatchStrategy {
21 public:
22   FastStrategy() {}
23   void ds_dispatch(Message *m) override {
24     msgr->ms_fast_preprocess(m);
25     if (msgr->ms_can_fast_dispatch(m))
26       msgr->ms_fast_dispatch(m);
27     else
28       msgr->ms_deliver_dispatch(m);
29   }
30   void shutdown() override {}
31   void start() override {}
32   void wait() override {}
33   virtual ~FastStrategy() {}
34 };
35 #endif /* FAST_STRATEGY_H */