X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fjournal%2FFuture.h;fp=src%2Fceph%2Fsrc%2Fjournal%2FFuture.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=1ddb606563282e8c6e3b74e0d297936c238401af;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/journal/Future.h b/src/ceph/src/journal/Future.h deleted file mode 100644 index 1ddb606..0000000 --- a/src/ceph/src/journal/Future.h +++ /dev/null @@ -1,58 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_JOURNAL_FUTURE_H -#define CEPH_JOURNAL_FUTURE_H - -#include "include/int_types.h" -#include -#include -#include -#include "include/assert.h" - -class Context; - -namespace journal { - -class FutureImpl; - -class Future { -public: - typedef boost::intrusive_ptr FutureImplPtr; - - Future() {} - Future(const FutureImplPtr &future_impl) : m_future_impl(future_impl) {} - - inline bool is_valid() const { - return m_future_impl.get() != nullptr; - } - - void flush(Context *on_safe); - void wait(Context *on_safe); - - bool is_complete() const; - int get_return_value() const; - -private: - friend class Journaler; - friend std::ostream& operator<<(std::ostream&, const Future&); - - inline FutureImplPtr get_future_impl() const { - return m_future_impl; - } - - FutureImplPtr m_future_impl; -}; - -void intrusive_ptr_add_ref(FutureImpl *p); -void intrusive_ptr_release(FutureImpl *p); - -std::ostream &operator<<(std::ostream &os, const Future &future); - -} // namespace journal - -using journal::intrusive_ptr_add_ref; -using journal::intrusive_ptr_release; -using journal::operator<<; - -#endif // CEPH_JOURNAL_FUTURE_H