]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/msg/async/Stack.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / msg / async / Stack.h
index 37a33163d6b0f7056449408a2c94e80201a7245f..6a2188b5a9c7921a5d152cee5c9103afa54677f3 100644 (file)
@@ -28,7 +28,7 @@ class ConnectedSocketImpl {
   virtual ~ConnectedSocketImpl() {}
   virtual int is_connected() = 0;
   virtual ssize_t read(char*, size_t) = 0;
-  virtual ssize_t send(bufferlist &bl, bool more) = 0;
+  virtual ssize_t send(ceph::buffer::list &bl, bool more) = 0;
   virtual void shutdown() = 0;
   virtual void close() = 0;
   virtual int fd() const = 0;
@@ -96,7 +96,7 @@ class ConnectedSocket {
   /// Gets the output stream.
   ///
   /// Gets an object that sends data to the remote endpoint.
-  ssize_t send(bufferlist &bl, bool more) {
+  ssize_t send(ceph::buffer::list &bl, bool more) {
     return _csi->send(bl, more);
   }
   /// Disables output to the socket.
@@ -293,18 +293,19 @@ class Worker {
 };
 
 class NetworkStack {
-  std::string type;
   unsigned num_workers = 0;
   ceph::spinlock pool_spin;
   bool started = false;
 
   std::function<void ()> add_thread(unsigned i);
 
+  virtual Worker* create_worker(CephContext *c, unsigned i) = 0;
+
  protected:
   CephContext *cct;
-  vector<Worker*> workers;
+  std::vector<Worker*> workers;
 
-  explicit NetworkStack(CephContext *c, const string &t);
+  explicit NetworkStack(CephContext *c);
  public:
   NetworkStack(const NetworkStack &) = delete;
   NetworkStack& operator=(const NetworkStack &) = delete;
@@ -314,10 +315,8 @@ class NetworkStack {
   }
 
   static std::shared_ptr<NetworkStack> create(
-          CephContext *c, const string &type);
+    CephContext *c, const std::string &type);
 
-  static Worker* create_worker(
-          CephContext *c, const string &t, unsigned i);
   // backend need to override this method if backend doesn't support shared
   // listen table.
   // For example, posix backend has in kernel global listen table. If one