Derecho  0.9
Distributed systems toolkit for RDMA
replicated_interface.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "derecho_internal.hpp"
4 #include <derecho/tcp/tcp.hpp>
5 
6 namespace derecho {
7 
14 public:
15  virtual ~ReplicatedObject() = default;
16  virtual bool is_valid() const = 0;
17  virtual std::size_t object_size() const = 0;
18  virtual void send_object(tcp::socket& receiver_socket) const = 0;
19  virtual void send_object_raw(tcp::socket& receiver_socket) const = 0;
20  virtual std::size_t receive_object(char* buffer) = 0;
21  virtual bool is_persistent() const = 0;
22  virtual void make_version(const persistent::version_t& ver, const HLC& hlc) noexcept(false) = 0;
23  virtual const persistent::version_t get_minimum_latest_persisted_version() noexcept(false) = 0;
24  virtual void persist(const persistent::version_t version) noexcept(false) = 0;
25  virtual void truncate(const persistent::version_t& latest_version) = 0;
26  virtual void post_next_version(const persistent::version_t& version, const uint64_t& msg_ts) = 0;
27 };
28 
29 } // namespace derecho
virtual void truncate(const persistent::version_t &latest_version)=0
virtual std::size_t object_size() const =0
virtual ~ReplicatedObject()=default
virtual bool is_valid() const =0
virtual std::size_t receive_object(char *buffer)=0
Common interface for all types of Replicated<T>, specifying some methods for state transfer and persi...
virtual void persist(const persistent::version_t version) noexcept(false)=0
Definition: HLC.hpp:7
virtual void make_version(const persistent::version_t &ver, const HLC &hlc) noexcept(false)=0
virtual void send_object_raw(tcp::socket &receiver_socket) const =0
virtual const persistent::version_t get_minimum_latest_persisted_version() noexcept(false)=0
virtual void post_next_version(const persistent::version_t &version, const uint64_t &msg_ts)=0
virtual void send_object(tcp::socket &receiver_socket) const =0
virtual bool is_persistent() const =0